I have the following in my manifest
<uses-feature android:name="android.hardware.camera" />
<uses-feature android:name="android.hardware.camera.autofocus" />
<uses-permission android:name="android.permission.CAMERA" />
however I receive this error
An error occurred while connecting to camera 0: Status(-8, EX_SERVICE_SPECIFIC): '1: validateClientPermissionsLocked:1165: Caller ... (PID 10153, UID 6049) cannot open camera "0" without camera permission'
I am attempting to get a camera working using this code
public static Camera getCameraInstance(){
Camera c = null;
try {
c = Camera.open();
} catch (Exception e) {
Log.e("getCameraInstance", "exception", e);
}
return c; // returns null if camera is unavailable
}
How do I get this camera working?