How to turn on or off mobile LED Flashlight in Adobe Air Android?

522 Views Asked by At

is there anyway to control mobile LED Flashlight in Adobe Air Android.

using adobe air 14 on flash CC

1

There are 1 best solutions below

0
SirCapsLock On

You can use a flashlight ANE or create your own. Here is one that I found: https://github.com/sewonist/FlashLight

With that ANE, you'll be able to control the LED flashlight like so:

if( Flashlight.getInstance().isSupported )
{
Flashlight.getInstance().on(); // turn on
Flashlight.getInstance().off(); // turn off
var mode:Boolean = Flashlight.getInstance().mode; // get torch mode
}