Android Camera Check checkCameraHardware(Context context)

Here you can find the source of checkCameraHardware(Context context)

Description

Detecting camera hardware

License

Apache License

Declaration

public static boolean checkCameraHardware(Context context) 

Method Source Code

//package com.java2s;
//License from project: Apache License 

import android.content.Context;
import android.content.pm.PackageManager;

public class Main {
    /**//from  w w  w .java 2 s.  com
     * Detecting camera hardware
     */
    public static boolean checkCameraHardware(Context context) {
        if (context.getPackageManager().hasSystemFeature(
                PackageManager.FEATURE_CAMERA)) {
            return true;
        } else {
            return false;
        }
    }
}

Related

  1. throwIfCameraDisabled(Activity activity)
  2. isCameraFlashSupported(Context context)
  3. isCameraSupported(Context context)
  4. isPortrait(Context context)
  5. checkCameraHardware(Context context)
  6. checkCameraHardware(Context context)
  7. checkCameraHardware(Context context)
  8. checkFrontCamera(Context context)
  9. deviceHasCamera(Context context)