I have written an application in android 1.5 to take a snapshot using SurfaceView. The image taken will have pink color fill at center. When we use a default camera application the photos are fine. I know there are some issues in android 1.5, also some hardware issues in some devices, however is there any workaround or settings to overcome this ?
A:
Instead of SurfaceView you can use default camera.
final Intent intent = new Intent(android.provider.MediaStore.ACTION_IMAGE_CAPTURE);
intent.putExtra(MediaStore.EXTRA_OUTPUT,
Uri.fromFile(new File(FILE_PATH)));
intent.putExtra(MediaStore.EXTRA_VIDEO_QUALITY, 3);
startActivityForResult(intent, CAMERA_CODE);
And in onActivityResult() fetch the image data from your sdcard. It is working in 1.5 also.
Nishant Shah
2010-08-03 06:11:34
Thanks for your reply. I thought of this first, however, I want it to be customized. I mean, I want options at the bottom of screen, like Back, Save, Retake, which I dont think is possible if we use default camera.
Prabhat
2010-08-03 06:15:55
But by default you are getting all this options.
Nishant Shah
2010-08-03 06:19:35
What I actually meant was the layout in which it is displayed. I want to customize it.
Prabhat
2010-08-03 06:37:40