I'm trying to include functionality in an app for taking photos. The camera activity comes up, I can take a photo and tap the checkmark for using the photo just taken, but the app never receives it because onActivityResult is never called.
Here is the code that activates the camera activity:
Intent takePictureIntent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);
if (takePictureIntent.resolveActivity(getPackageManager()) != null) {
startActivityForResult(takePictureIntent, REQUEST_IMAGE_CAPTURE);
}
REQUEST_IMAGE_CAPTURE is set to 1.
The onActivityResult method that is never called looks like this:
@Override
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
...
}
The app has only one activity, the main activity. I have tried different settings in the manifest, with no luck.