Code example for PackageManager

Methods: hasSystemFeature

0
	 */ 
	public static boolean deviceCameraHasAutofocus(Context context) {
 
		PackageManager pm = context.getPackageManager();
 
		if (pm.hasSystemFeature(PackageManager.FEATURE_CAMERA_AUTOFOCUS)) {
			return true; 
		} else { 
			return false; 
		} 
	} 
 
	public static boolean isHoneycomb() { 
		// Can use static final constants like HONEYCOMB, declared in later 
		// versions 
		// of the OS since they are inlined at compile time. This is guaranteed 
		// behavior. 
		return Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB;
	} 
 
Contextual code suggestions in your IDE  Get Codota for Java