0

I'm using a chooser to allow the user to pick a photo from his gallery or take a new one using his camera (I copied the code from this answer).
Picking an image from the gallery works perfect. The problem is that when I capture an image with the camera It's not returning to the app and just stays in the confirmation screen...
I actually don't even need this screen to be displayed in the first place...
Can I somehow disable it or (if not) just make the Done button work?
Thanks in advance!

Community
  • 1
  • 1
Dotan
  • 33
  • 9

1 Answers1

1

Can I somehow disable it

No.

just make the Done button work?

Contact the developers of your camera app, and point out the bug. Perhaps someday they will fix it.

You are using ACTION_IMAGE_CAPTURE. This launches a third-party camera app, to take a picture. There thousands of Android device models. These ship with hundreds of different pre-installed camera apps, and there are many more available for download from the Play Store and elsewhere. Any could be the one that handles a given ACTION_IMAGE_CAPTURE request, and any of them can have bugs.

CommonsWare
  • 910,778
  • 176
  • 2,215
  • 2,253
  • I tried other camera apps as well... In the other apps, It shows the capture animation but just stays in the app. Maybe I should tell the camera I need a photo back or something? I thought I handled it with the `startActivityForResult` call... – Dotan Apr 08 '16 at 13:01
  • @Dotan: You are picking a series of buggy camera apps. `ACTION_IMAGE_CAPTURE` is not very reliable, due to buggy camera apps. – CommonsWare Apr 08 '16 at 13:13
  • Can you suggest a trusted app so I can test that's really a bug in the camera app? – Dotan Apr 08 '16 at 13:14
  • @Dotan: I have only used `ACTION_IMAGE_CAPTURE` with pre-installed camera apps. I have not had a problem with it using Nexus devices. Beyond that, I avoid `ACTION_IMAGE_CAPTURE`. – CommonsWare Apr 08 '16 at 13:42
  • So can you suggest a different approach to get a picture from the camera? – Dotan Apr 08 '16 at 13:43
  • @Dotan: Use the camera APIs directly, whether yourself of through a library, like [mine](https://github.com/commonsguy/cwac-cam2). – CommonsWare Apr 08 '16 at 13:47