Android.hardware.camera2 CAMERA ERROR IN USE

I use the google sample 'android-Camera2Video':

https://github.com/googlesamples/android-Camera2Video

The problem is that when the application finishes recording, sometimes it goes silent for a moment and then calls the onError () handler of CameraDevice.StateCallback with 1 - ' ERROR_CAMERA_IN_USE .

This does not happen every time, it happens in about 90% of cases, and sometimes everything works fine, without errors. I could not find out what it depends on and how to solve this problem. If anyone has encountered this problem before, please help.

+4
source share

Source: https://habr.com/ru/post/1654679/


All Articles