Android image capture does not work

1k views Asked by At

I have seen this question many times. In every single case I have tried the source code that someone answers with. It has never worked. All I need is to capture an image! I simply start an intent using ACTION_IMAGE_CAPTURE.

Issues I'm running into: - Image returned is NEVER full size, even when EXTRA_OUTPUT is specified - Camera application does not take photos if EXTRA_OUTPUT is specified - Resulting intent is null or the getData() method returns null - If I specify a Uri for the image in advance and then load the image later from that Uri the width/height are always -1.

I found an Android bug here: http://code.google.com/p/android/issues/detail?id=1480 That link basically says it's impossible and that I need to write my own activity. I have no clue how to do that though, does anyone have an example?

I've found numerous threads on this at stackoverflow.com. But no one has had a working solution yet. Has anyone found a way to make this work?

2

There are 2 answers

0
Paul On BEST ANSWER

Certain devices simply don't work for this. It's a known issue. Those devices have moved on in age and I don't run into them anymore.

1
Blomkvist On

I tried the first example google gave me and it worked fine, extra_output and all. Using Eclipse and the standard virtual devices it ran on 1.5 and up for me. If you're doing something more fancy you may need to use NDK for lower level access.