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 also encountered this question, I solved it through adding two conditions one is:
resultCode != null
the other is:
resultCode != RESULT_CANCELED