List of utility methods to do Camera Check
void | throwIfCameraDisabled(Activity activity) throw If Camera Disabled DevicePolicyManager dpm = (DevicePolicyManager) activity .getSystemService(Context.DEVICE_POLICY_SERVICE); if (dpm.getCameraDisabled(null)) { throw new CameraDisabledException(); |
boolean | isCameraFlashSupported(Context context) is Camera Flash Supported return context.getPackageManager().hasSystemFeature(
PackageManager.FEATURE_CAMERA_FLASH);
|
boolean | isCameraSupported(Context context) is Camera Supported return context.getPackageManager().hasSystemFeature(
PackageManager.FEATURE_CAMERA);
|
boolean | isPortrait(Context context) is Portrait return (context.getResources().getConfiguration().orientation == Configuration.ORIENTATION_PORTRAIT);
|
boolean | checkCameraHardware(Context context) Check if this device has a camera if (context.getPackageManager().hasSystemFeature( PackageManager.FEATURE_CAMERA)) { return true; } else { return false; |
boolean | checkCameraHardware(Context context) Detecting camera hardware if (context.getPackageManager().hasSystemFeature( PackageManager.FEATURE_CAMERA)) { return true; } else { return false; |
boolean | checkCameraHardware(Context context) check Camera Hardware if (context.getPackageManager().hasSystemFeature( PackageManager.FEATURE_CAMERA)) { return true; } else { return false; |
boolean | checkCameraHardware(Context context) Check if this device has a camera if (context.getPackageManager().hasSystemFeature( PackageManager.FEATURE_CAMERA)) { return true; } else { return false; |
boolean | checkFrontCamera(Context context) Check if this device has front camera if (context.getPackageManager().hasSystemFeature( PackageManager.FEATURE_CAMERA_FRONT)) { return true; } else { return false; |
boolean | deviceHasCamera(Context context) device Has Camera return context.getPackageManager().hasSystemFeature(
PackageManager.FEATURE_CAMERA);
|