Page 1 of 1

Turn torch on and off

Posted: Mon Mar 24, 2014 5:59 am
by trent mclennan

How can i add the function to turn the torch on my phone on and off by pressing a button in an app??


Turn torch on and off

Posted: Mon Mar 24, 2014 8:39 am
by Maryna Brodina

Hello!

It's a device feature, it's not added by default. You would need to search fro PhoneGap plugin to do that.


Turn torch on and off

Posted: Thu Apr 10, 2014 6:04 am
by Jacob Mayer

I have the same question and the default Camera Service doesn't seem to have the light options included.
How would I add a PhoneGap plugin that allowed me to manipulate the the camera torch light?


Turn torch on and off

Posted: Thu Apr 10, 2014 9:43 am
by Maryna Brodina

Hello!

Here is plugin sample https://build.phonegap.com/plugins/294, you can also search for other plugins. Here is how to add plugin for Android http://docs.appery.io/documentation/u...
Unfortunately there is no way to add plugin for iOS through builder, you would need to do that in xCode. We are working on this functionality.