Code example for Camera: Taking pictures with the camera

Methods: takePicture

-2
		 
		return(super.onKeyDown(keyCode, event));
	} 
	 
	private void takePicture() { 
		 camera.takePicture(null, null, photoCallback);
	} 
	 
	SurfaceHolder.Callback surfaceCallback=new SurfaceHolder.Callback() {
		public void surfaceCreated(SurfaceHolder holder) { 
			camera=Camera.open(); 
			 
			try { 
				camera.setPreviewDisplay(previewHolder); 
			} 
			catch (Throwable t) { 
				Log.e("Photographer", 
							"Exception in setPreviewDisplay()", t); 
				Toast 
					.makeText(Photographer.this, t.getMessage(), 
										Toast.LENGTH_LONG)