Created
February 13, 2013 04:48
-
-
Save DavidTPate/4942376 to your computer and use it in GitHub Desktop.
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
private boolean hasCamera(Context context) { | |
if (context.getPackageManager().hasSystemFeature(PackageManager.FEATURE_CAMERA)) { | |
// this device has a camera | |
Log.d(TAG, "At Least one Camera Detected!"); | |
return true; | |
} else { | |
// no camera on this device | |
Log.d(TAG, "No Cameras detected."); | |
return false; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment