1.0.0 • Published 4 years ago
cordova-plugin-screenstatus v1.0.0
Cordova ScreenStatus Plugin
Cordova plugin to monitor status changes of the screen. Works even if the app is not in the foreground.
Installation
Cordova
cordova plugin add cordova-plugin-screenstatusIonic + Cordova
ionic cordova plugin add cordova-plugin-screenstatusCapacitor
npm install cordova-plugin-screenstatusAPI
subscribe()
ScreenStatus
.subscribe(function(turnedOn) {
// true, false
})
.then(function () {
// subscribed
})
.catch(function (err) {
// something broke
});unsubscribe()
ScreenStatus
.unsubscribe()
.then(function () {
// unsubscribed
})
.catch(function (err) {
// something broke
});1.0.0
4 years ago