0.2.0 • Published 3 years ago

cordova-check-screen-lock v0.2.0

Weekly downloads
-
License
Apache 2.0
Repository
github
Last release
3 years ago

Cordova-Screen-Lock-Enabled

--

This is a Cordova plugin to determine if a device has a screen lock set for getting in. The majority of the code was cribbed from various platform-specific StackOverflow questions.

Supported Platforms

  • iOS > 8.0
  • Android > 4.1

Installing

Install with Cordova cli

$ cordova plugin add cordova-check-screen-lock

Usage

  • After getting deviceReady event;
screenLock.isScreenLockEnabled(success, failure);

function success(result) {
	if (result) {
		console.log('this device has screen lock enabled.');
	} else {
		console.log('this device does not have screen lock enabled.');
	}
};

function failure(err) {
	console.log("Error " + err);
};