Skip to content

A Cordova plugin to determine if the device has a screen lock enabled.

License

Notifications You must be signed in to change notification settings

ABarak64/Cordova-Screen-Lock-Enabled

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

A Cordova plugin to determine if the device has a screen lock enabled.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published