CameraManager | API reference | Android Developers If setTorchMode(String, boolean) is called to turn on or off the torch mode successfully, CameraManager TorchCallback onTorchModeChanged will be invoked However, even if turning on the torch mode is successful, the application does not have the exclusive ownership of the flash unit or the camera device
java - setTorchMode-IllegalArgumentException - Stack Overflow I am getting this crash in firebase from a flashlight app Fatal Exception: java lang IllegalArgumentException: setTorchMode:2297: Camera ID quot;0 quot; is a not valid camera ID at android