android.hardware.camera2.CameraAccessException

Is there any way to access the android phone camera (instead of the nreal camera)? If I try to request it I get the following logcat error:

08-05 12:03:34.807: E/Unity(9544): Camera2: CameraAccessException android.hardware.camera2.CameraAccessException: CAMERA_DISABLED (1): validateClientPermissionsLocked:1496: Caller “com.mycompany.myapplication” (PID 10307, UID 9544) cannot open camera “1” when camera is bloked by device state.

What are you using?

With WebCamTexture I have no problem to access the android phone camera.

WebCamTexture PhoneCamTexture { get; set; }
PhoneCamTexture = new WebCamTexture(width, height);
PhoneCamTexture.Play();
// do stuff
PhoneCamTexture.Stop();

With nreal glasses connected? If so I must have done something stupid. I’ll try a new project

Yes, otherwise the nreal app doesnt start

Thank you for clarifying. Ok, sounds like I must have done something silly. I’ll dig deeper when I get a chance and report back.