KeyGuardPlugin
Cordova keyguard plugin
Installation
If using cordova-cli
5.0 or newer:
cordova plugin add cordova-keyguard-plugin
for older versions:
cordova plugin add https://github.com/vstirbu/cordova-keyguard-plugin.git
JavaScript API
The plugin exposes the keyguard state for the application as navigator.keyguard
object.
Reading the keyguard state
navigatorkeyguard;
Changing the keyguard state
To activate the keyguard use the following:
navigatorkeyguard = true;
To deactivate the keyguard use the following:
navigatorkeyguard = false;
keyguard
event
The plugin emits keyguard
events whenever the state change has completed. You can reister for this events:
window;
Suported platforms
- Android
License
The plugin is available under MIT license.