Android examples for android.hardware:Camera
check Camera Hardware
import android.content.Context; import android.content.pm.PackageManager; public class Main { /**/* ww w . j a v a 2 s . c o m*/ * Check if this device has a camera */ public static boolean checkCameraHardware(Context context) { if (context.getPackageManager().hasSystemFeature(PackageManager.FEATURE_CAMERA)) { // this device has a camera return true; } else { // no camera on this device return false; } } }