Android examples for android.hardware:Back Camera
Check if hardware has back Camera
import android.content.Context; import android.content.pm.PackageManager; import android.os.Build; public class Main{ /**//from www. jav a 2 s .c o m * @param context * the application context * @return true if the device has a rear camera, false else */ public static boolean hasCameraBack(Context context) { PackageManager pm = context.getPackageManager(); return pm.hasSystemFeature(PackageManager.FEATURE_CAMERA); } }