Android examples for Camera:Camera Feature
Check if a device has Camera via PackageManager
import android.content.Context; import android.content.pm.PackageManager; public class Main { public static boolean hasCamera(Context context) { return context.getPackageManager().hasSystemFeature(PackageManager.FEATURE_CAMERA) || context.getPackageManager().hasSystemFeature(PackageManager.FEATURE_CAMERA_FRONT); }//from www .java 2 s .c o m }