Appcelerator/Titanium module to unlock and power on an Android device.
Java Python JavaScript
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
.settings first commit Nov 24, 2011
assets
dist
documentation
example
hooks
platform
src/com/yydigital/keyguard first commit Nov 23, 2011
.classpath
.gitignore
.project
LICENSE
README
build.properties first commit Nov 23, 2011
build.xml
manifest
timodule.xml

README

I needed a way of turning on and unlocking the screen of my Android device for an incoming SIP call.
Here is the module.

You need to include the module in the tiapp.xml:
            <module platform="android" version="0.1">com.yydigital.keyguard</module>

You also need to add these permissions:
            <!-- For Key Guard -->
            <uses-permission android:name="android.permission.DISABLE_KEYGUARD"/>
            <uses-permission android:name="android.permission.WAKE_LOCK"/>


Then the code is something like this:

        var keyguard = require("com.yydigital.keyguard");

To disable the keyguard:       
        keyguard.disable();

To turn on the screen:
			  keyguard.wakeUp();

To enable the keyguard again:
			  keyguard.enable();