Skip to content

Instantly share code, notes, and snippets.

@vuhung3990
Created August 29, 2015 02:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vuhung3990/96c7d40046cca6e08ff6 to your computer and use it in GitHub Desktop.
Save vuhung3990/96c7d40046cca6e08ff6 to your computer and use it in GitHub Desktop.
Check if this device has a camera
/** 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