I'm creating an Android application which uses user captured images as part of a larger process. So far my XML layout has a SurfaceView and Button inside a RelativeLayout. I've managed to get the camera preview to show on the SurfaceView but I'm stuck on how to take a picture and save it when a user presses the button.
My class file looks something like the CameraPreview API demo: http://developer.android.com/resources/samples/ApiDemos/src/com/example/android/apis/graphics/CameraPreview.html
Ideally, when the button it pressed the camera should autofocus, snap a picture (with the clicky sound), save it to /data/data/app_package_structure/files/file_name.jpg
, then pop up a Toast to tell the user their image has been saved.
Any help is much appreciated :)