- Home /
Webcamtexture with Android flashlight
For one of the projects I'm working on we need the user to be able to turn on the Android torch/flashlight while simultaneously using the camera and WebCamTexure for rendering in Unity. I'm wondering if there's any way possible to do this. I've tried multiple different avenues to try and achieve this, such as creating different plugins for each of the android camera libraries (base Camera, Camera2, and CameraX) and haven't been able to accomplish it. The main error callback that I'm getting when I try to turn the torch on is ERROR_CAMERA_IN_USE (The camera is already being used by another app), so I'm assuming Android's camera services will not allow two applications to use the same camera concurrently.
This functionality is pretty important to our app, so I'm hoping there's some possible way to achieve this or some workaround I can implement. Does anyone have any recommendations on how to do it, or if it's even at all possible to do?
Your answer
![](https://koobas.hobune.stream/wayback/20220613060100im_/https://answers.unity.com/themes/thub/images/avi.jpg)