is Camera Present - Android android.hardware

Android examples for android.hardware:Camera State

Description

is Camera Present

Demo Code

import android.hardware.Camera;

public class Main{

    public static boolean isCameraPresent() {
        int numCameras = Camera.getNumberOfCameras();
        return numCameras > 0;
    }/*from  w ww  . ja v  a  2s . c o m*/

}

Related Tutorials