Created
August 29, 2015 02:45
-
-
Save vuhung3990/96c7d40046cca6e08ff6 to your computer and use it in GitHub Desktop.
Check if this device has a camera
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** Check if this device has a camera */ | |
private 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; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment