List of usage examples for android.content.pm PackageManager FEATURE_CAMERA
String FEATURE_CAMERA
To view the source code for android.content.pm PackageManager FEATURE_CAMERA.
Click Source Link
From source file:Main.java
public static boolean deviceHasCamera(final PackageManager packageManager) { if (packageManager.hasSystemFeature(PackageManager.FEATURE_CAMERA)) { return true; }/* w ww .j av a2s . c o m*/ return false; }
From source file:Main.java
public static boolean hasCamera(Context context) { return context.getPackageManager().hasSystemFeature(PackageManager.FEATURE_CAMERA); }
From source file:Main.java
public static boolean hasCameraHardware(Context context) { return context.getPackageManager().hasSystemFeature(PackageManager.FEATURE_CAMERA); }
From source file:Main.java
public static boolean checkForCamera(Context context) { if (context.getPackageManager().hasSystemFeature(PackageManager.FEATURE_CAMERA)) return true; else/*w w w . ja v a2 s. co m*/ return false; }
From source file:Main.java
public static boolean isCameraSupported(Context context) { return context.getPackageManager().hasSystemFeature(PackageManager.FEATURE_CAMERA); }
From source file:Main.java
public static boolean isDeviceSupportCamera(Context context) { if (context.getPackageManager().hasSystemFeature(PackageManager.FEATURE_CAMERA)) { // this device has a camera return true; } else {//from ww w . ja v a2s . c o m // no camera on this device return false; } }
From source file:Main.java
public static final boolean Camera_checkHardware(Context context) { if (context.getPackageManager().hasSystemFeature(PackageManager.FEATURE_CAMERA)) { return true; } else {//from w w w . ja va 2 s . c o m return false; } }
From source file:Main.java
public static boolean isCameraHardwareAvailable(Activity currentActivity) { return currentActivity.getPackageManager().hasSystemFeature(PackageManager.FEATURE_CAMERA); }
From source file:Main.java
public static boolean checkCameraHardware(Context context) { if (context != null && context.getPackageManager().hasSystemFeature(PackageManager.FEATURE_CAMERA)) { return true; } else {/*from w ww .j a v a 2 s . c om*/ return false; } }
From source file:Main.java
public static boolean hasCamera(Context context) { PackageManager pm = context.getPackageManager(); return pm.hasSystemFeature(PackageManager.FEATURE_CAMERA) || pm.hasSystemFeature(PackageManager.FEATURE_CAMERA_FRONT); }