I wanted to know if it is possible to access the camera as well as the flashlight at the same instance. Right now i have an app with a Camera View and a button to access the flashlight. I've got the code for the flashlight working as well. My problem is that the moment i switch on my flash light the app crashes and it gives me an error stating : "java.lang.RuntimeException: Fail to connect to camera service". I've read somewhere that an app tends to throw exception if the camera is already accessed. Is this true?? Please provide me with some insights. Thank You
Asked
Active
Viewed 296 times
0
-
Is the Flashlight turned by code? Can't that same code stop the camera and re-initialise it with flashlight enabled? – VC.One Jul 01 '16 at 19:06
-
yes the flash light is turned on by code. I can't stop the camera. The main purpose of the camera is to scan barcode or qrcode. So i need the camera initialized as well as the flashlight. Is there any way of achieving this? – rogue_shadow Jul 02 '16 at 02:47
-
Show some code? Show how you involve light & camera and which code lines give your error(s). Anyways I suggested a solution. Hope it helps. – VC.One Jul 02 '16 at 03:13