I know there is a way to turn on front / rear camera but in my case I was wondering if there was a way to toggle on and off the camera flashlight from a web browser.
Asked
Active
Viewed 1.3k times
9
-
1Give a look [here](https://stackoverflow.com/a/47153547/6313073). – Angel Politis Dec 21 '17 at 09:26
-
4Possible duplicate of [Is it possible to control the camera light on a phone via a website?](https://stackoverflow.com/questions/37848494/is-it-possible-to-control-the-camera-light-on-a-phone-via-a-website) – boysimple dimple Dec 21 '17 at 09:27
-
I have actually tried that solution from angel Politis but nothing happens on my android phone. – Daniele Pais Dec 21 '17 at 10:39
1 Answers
3
I have found out why the solution suggested by @Angel Politis was not working for me and it has to do with SSL protected page. In essence I have visited the other link as suggested and copied the script but it did not work when I had upload it to my server which is not using the HTTPS protocol. Howwever, I have tried on a different server, (HTTPS), and it works flawlessly.
Many thanks all.

Daniele Pais
- 141
- 1
- 1
- 10