0.2.1 • Published 10 years ago
cordova-keyguard-plugin v0.2.1
KeyGuardPlugin
Cordova keyguard plugin
Installation
If using cordova-cli 5.0 or newer:
cordova plugin add cordova-keyguard-pluginfor older versions:
cordova plugin add https://github.com/vstirbu/cordova-keyguard-plugin.gitJavaScript API
The plugin exposes the keyguard state for the application as navigator.keyguard object.
Reading the keyguard state
navigator.keyguard;Changing the keyguard state
To activate the keyguard use the following:
navigator.keyguard = true;To deactivate the keyguard use the following:
navigator.keyguard = false;keyguard event
The plugin emits keyguard events whenever the state change has completed. You can reister for this events:
window.addEventListener('keyguard', function (state) {
// state can be true or false;
});Suported platforms
- Android
License
The plugin is available under MIT license.