screen-lock-enabled

0.1.0 • Public • Published

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 https://github.com/abarak64/cordova-screen-lock-enabled.git

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);
};

Package Sidebar

Install

npm i screen-lock-enabled

Weekly Downloads

0

Version

0.1.0

License

Apache 2.0

Last publish

Collaborators

  • abarak64