/** A safe way to get an instance of the Camera object. */
public static Camera getCameraInstance(){
    Camera c = null;
    try {
        c =; // attempt to get a Camera instance
        //if API>8 then 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


Ad blocker interference detected!

Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.