How to use the rear view camera and the foreground camera at the same time?

My new application requirement is that the client wants to create a spy camera that records video in the background. Now that the phone is locked and the user is absent, so in the absence of the user someone is trying to use the phone, he will start recording video in the background. I did all this and it works like a charm, no problem with that.

Now the problem is that the service starts the video recording in the background and at this time I open the default application for the camera, and this will not allow me to use the camera application, which is obvious because my service uses this camera in the background.

So my question is, can we use both the background camera and the foreground camera at the same time? AFAIK it is not possible to use background cameras and a foreground camera.

When I was looking for a stack overflow, someone said that the Samsung s4 application by default does so that you can grab the front and back, and I have s4 and the default application does this, but when I install and use my application, he raises the same problem.

Now I plan to stop the video recording when the default camera application opens. But is there any other way besides stopping recording?

+4
source share

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


All Articles