Hi guys. Good old camera problem, but hope someone figured out by now.
So here is the code that I'm using to take pictures with the pre-installed camera app.
The code that start the activity with the intent.
The onActivityResult() implementation
As you can see the problem is that onActivityResult() resultCode is -1 probably there isn't extra data in the returning Intent so there can't be Bitmap pulled out of that data. And the contrition in the "if" command if(b.containsKey(MediaStore.EXTRA_OUTPUT)) is false.
So any clue what I am missing here?
This code is copy-pasted from this tutorials:
which are a bit outdated but but still works when I run it. All the examples I've seen use this approach?
So what are my opinions on this:
1. I think that there is something about the Uri passed in the Intent's extra data.
2. Maybe something is happening in the onResume() method when the calling activity is displayed after the
camera app close and resets some variables.
So anyway I'm attaching the whole class where this code is placed(it is messy code but hey I need quick and working solution no plans for maintenance)