My app allows the user to press a button, it opens the camera, they can take a photo and it will show up in an imageview. If the user presses back or cancel while the camera
I recommend using this:
Retrieve the father Intent.
Intent
Intent intentParent = getIntent();
Convey the message directly.
setResult(RESULT_OK, intentParent);
This prevents the loss of its activity which would generate a null data error.