Android examples for android.hardware:Front Camera
Check if has Front Camera
import android.content.Context; import android.content.pm.PackageManager; import android.os.Build; public class Main{ /**/* www .j a v a 2s . co m*/ * @param context * the application context * @return true if the device has a front camera, false else */ public static boolean hasCameraFront(Context context) { PackageManager pm = context.getPackageManager(); return pm.hasSystemFeature(PackageManager.FEATURE_CAMERA_FRONT); } }