cordova-plugin-screenstatus

1.0.0 • Public • Published

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

Dependencies (0)

    Dev Dependencies (0)

      Package Sidebar

      Install

      npm i cordova-plugin-screenstatus

      Weekly Downloads

      1

      Version

      1.0.0

      License

      MIT

      Unpacked Size

      8.87 kB

      Total Files

      7

      Last publish

      Collaborators

      • kolbasa