I want to use the built-in camera functionality of a device. having read the documentation, this is the method I am using
private void dispatchTakePictureIntent() {
Intent takePictureIntent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);
if (takePictureIntent.resolveActivity(getPackageManager()) != null) {
startActivityForResult(takePictureIntent, REQUEST_IMAGE_CAPTURE);
}
}
In the manifest I added the usage:
<uses-feature android:name="android.hardware.camera"
android:required="true" />
However, when I invoke the method, the error dialog appears. Why is that?