Skip to content

kolbasa/cordova-plugin-screenstatus

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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-screenstatus

Ionic + Cordova

ionic cordova plugin add cordova-plugin-screenstatus

Capacitor

npm install cordova-plugin-screenstatus

API

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

About

Cordova plugin to monitor status changes of the screen.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published