Android examples for android.hardware:Camera State
Check if this device has a camera
import android.content.Context; import android.content.pm.PackageManager; public class Main{ /**//from w ww. j av a 2 s .c o m * */ public static boolean checkCameraHardware(Context context) { return (context.getPackageManager() .hasSystemFeature(PackageManager.FEATURE_CAMERA)); } }