Created
May 27, 2015 05:41
-
-
Save yaronv/98cdab11598541f89c03 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
public boolean isCameraSupported(Context context) { | |
PackageManager packageManager = context.getPackageManager(); | |
if(packageManager.hasSystemFeature(PackageManager.FEATURE_CAMERA) == false){ | |
Toast.makeText(context, "This device does not have a camera.", Toast.LENGTH_SHORT).show(); | |
return false; | |
} | |
return true; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment