0

This is my code, and I have no idea why it is crashing.

This is the image of my code in android. I'm not having any error or warning that could make my app crash, but it is still crashing.

Avi
  • 362
  • 1
  • 3
  • 11
  • Do you have a stacktrace or anything else for us? – JCWasmx86 Sep 15 '20 at 14:19
  • [https://stackoverflow.com/questions/12952859/capturing-images-with-mediastore-action-image-capture-intent-in-android](https://stackoverflow.com/questions/12952859/capturing-images-with-mediastore-action-image-capture-intent-in-android) i think this is your answer – Alireza Sep 15 '20 at 14:21

1 Answers1

0

you should consider adding

 if (resultCode == Activity.RESULT_OK) {

to your if condition bellow the onActivityResult .

narcis dpr
  • 939
  • 2
  • 12
  • 32