Android - Capture photo

Paresh Mayani picture Paresh Mayani · Aug 16, 2010 · Viewed 12.9k times · Source

In my application, i have to implement native camera activity where i have to launch the camera and take photo.

In detail, my application containing, One TextView (at top) to display activity name and one Button (At bottom) and in Middle Area of the screen, Camera preview should be viewed..When user click on that Button, Snaps should be clicked and display it into Imageview of another activity.

I know that the following approach is used:

Intent intent = new Intent(android.provider.MediaStore.ACTION_IMAGE_CAPTURE );
intent.putExtra( MediaStore.EXTRA_OUTPUT, outputFileUri );
startActivityForResult( intent, 0 );

But this approach if i used then my textview and button view is not displayed.

(Pls note that: I am using Android SDK 1.5 with HTC Hero)

pls help me by suggestion of any article, site, or pdf.

thanx, paresh

Answer

ninjasense picture ninjasense · Aug 16, 2010

If you are trying to use the native camera, once the native camera is called it will control your view. However if you want to implement your own camera, then such a layout would be possible. Some good examples can be found here:

Goodluck!