I'm using the phone's camera in an Android app to take a photo. I'm using Intents to use the built-in camera application and I'm using the following code:
Intent intent = new Intent("android.media.action.IMAGE_CAPTURE");
intent.putExtra(MediaStore.EXTRA_OUTPUT, Uri.fromFile(new File(FILEPATH)));
startActivityForResult(intent, ACTIVITY_NATIVE_CAMERA_AQUIRE);
It works fine and the camera is brought up. I can take a photo and the phone presents me with three options: Cancel, Retake, OK. The first two work, pressing cancel returns the user to the app, but pressing OK and nothing happens. Apparently onActivityResult isn't being called, and the camera just stays on the screen. Nothing in the debugger either.
Running the app on a Nexus One with Android 2.2.1. Same problem on the emulator running Android 2.0.
Edit: Tested on a HTC Desire running Android 2.2 with HTC's Sense UI: works perfectly. Nothing on the emalator nor Google N1.
Edit2: It seems that the HTC Desire image aquiring activity works better in the sense that it does return, but it disregards the EXTRA_OUTPUT -setting and returns only a small image in the onActivityResult -call. Checking on the ddms console while the phone is hooked to the computer I see that the phone is storing the image on the SD card, but the path is not passed back to my application. It is starting to look like there is no reliable way to use the camera intent, and get back a reasonably-sized image. Bad, bad, bad.