Skip to content

FlashLight is ANE about using light or torch for iOS and Android.

Notifications You must be signed in to change notification settings

WuVincent/FlashLight

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

FlashLight

FlashLight is ANE about using light or torch for iOS and Android.

Installation

On Android:

  • you need to enable the following permissions (otherwise the returned state will always be not connected):

    <android>
        <manifestAdditions><![CDATA[
            <manifest android:installLocation="auto">
                
                ...
    
                <uses-permission android:name="android.permission.CAMERA" />
    			<uses-permission android:name="android.permission.FLASHLIGHT" />
                
                ...
    
            </manifest>
        ]]></manifestAdditions>
    </android>

Usage

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

About

FlashLight is ANE about using light or torch for iOS and Android.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C 64.0%
  • Java 15.9%
  • Objective-C 14.0%
  • ActionScript 6.1%