Android/Snippets/AccesingCamera

http://developer.android.com/guide/topics/media/camera.html#access-camera

/** A safe way to get an instance of the Camera object. */ public static Camera getCameraInstance{ Camera c = null; try { c = Camera.open; // attempt to get a Camera instance //if API>8 then Camera.open(int) can be used to pick a         // particular camera }     catch (Exception e){ // Camera is not available (in use or does not exist) }     return c; // returns null if camera is unavailable }

fewe