HaxeExtension / extension-wake-lock

OpenFL / NME Extension to disable / enable screen lock after some inactivity time

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

extension-wake-lock

Lime extension for enabling / disabling automatic screen lock on Android.

Main Features

  • Enable automatic screen locking.
  • Disable automatic screen locking.

How to Install

To install this library, you can simply get the library from haxelib like this:

haxelib install extension-wake-lock

How to Use

To use this extension, simply add the next line in the project.xml

<haxelib name="extension-wake-lock" />

Then, on your hace code:

function someFunction(){
	// to disable screen Lock
	extension.wakeLock.WakeLock.allowScreenTimeout = false;

	// to enable screen Lock
	extension.wakeLock.WakeLock.allowScreenTimeout = true;
}

License

The MIT License (MIT) - LICENSE.md

Copyright © 2015 SempaiGames (http://www.sempaigames.com)

Author: Joacko Bengochea & Federico Bricker

About

OpenFL / NME Extension to disable / enable screen lock after some inactivity time

License:Other


Languages

Language:Java 50.9%Language:Haxe 33.6%Language:Shell 8.9%Language:Batchfile 6.7%