What I'm trying to achieve: simultaneously access front and rear cameras.
What I researched: I know that the Android camera API does not support using multiple instances of the camera, and you need to free the camera before using another. I read dozens of questions about this, I know on some devices it is possible (for example, Samsung S4 or other new devices from them). I also found out that they have access to both of them in Android KitKat on some devices. I also know that on api> = 21, using the camera2 API, you can access both of them at the same time, since it is thread safe.
What I have so far: implementation for accessing cameras one at a time to provide image in picture.
I know that it is impossible to implement a dual camera simultaneously on each device, I just want to make it available for some devices.
How can I check if a device can access both of them?
I was also looking for a library that could allow me such a thing, but I did not find anything. Is there such a library?
I would like to make this function available for as many devices as possible, and for the rest I will leave the current state (one by one) of this function.
Can someone help me with at least some tips?
thanks
android camera
DDsix
source share