I have two Activities, A1 and A2. A1 calls A2 and from A2, I am calling the camera intent as below:
launchIntent = new Intent(android.provider.MediaStore.ACTION_IMAGE_CAPTURE);
launchIntent.putExtra(MediaStore.EXTRA_OUTPUT,photoPath);
startActivityForResult(launchIntent,CAMERA_REQUEST);
It opens the camera, and I can take the picture. The problem arises once I click the save button (tick button in s3). My onActivityResult function is not called; instead, A2's onDestroy method is called. I have few steps to be done in the onActivityResult function.
I have my manifest like this for my second Activity (A2):
android:configChanges="keyboardHidden|orientation|locale"
android:screenOrientation="portrait
In HTC One X, my onActivityResult function is getting called, but in my S3 second Activity(A2) is getting destroyed.
How can I fix this?
noHistory=true
or `Intent.FLAG_ACTIVITY_NO_HISTORY
. See here for details: https://mcmap.net/q/356075/-onactivityresult-not-called-after-taking-a-photo-in-android – Elena