# cordova-plugin-screenstatus

> Cordova plugin to monitor status changes of the screen.

Latest version **1.0.0** (published 2022-02-13) · MIT license · 0 weekly downloads

## Install

```sh
npm install cordova-plugin-screenstatus
pnpm add cordova-plugin-screenstatus
yarn add cordova-plugin-screenstatus
bun add cordova-plugin-screenstatus
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.0 |
| Published | 2022-02-13 |
| First published | 2022-02-13 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 8.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Michael Jedich |
| Maintainers | kolbasa |
| Keywords | android, screen, status, listener, power, on, off |

## Links

- npm: https://www.npmjs.com/package/cordova-plugin-screenstatus
- Repository: https://github.com/kolbasa/cordova-plugin-screenstatus
- Issues: https://github.com/kolbasa/cordova-plugin-screenstatus/issues
- npm.io page: https://npm.io/package/cordova-plugin-screenstatus

## Alternatives

- [@mapbox/jsonlint-lines-primitives](https://npm.io/package/@mapbox/jsonlint-lines-primitives.md) — 5.3M weekly downloads
- [reftools](https://npm.io/package/reftools.md) — 3.5M weekly downloads
- [@hey-api/openapi-ts](https://npm.io/package/@hey-api/openapi-ts.md) — 3.5M weekly downloads
- [@mapbox/geojson-rewind](https://npm.io/package/@mapbox/geojson-rewind.md) — 2.4M weekly downloads
- [turbo-stream](https://npm.io/package/turbo-stream.md) — 1.7M weekly downloads

## Recent versions

- 1.0.0 (latest) — 2022-02-13

## README

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()

```js
ScreenStatus
    .subscribe(function(turnedOn) {
        // true, false
    })
    .then(function () {
        // subscribed
    })
    .catch(function (err) {
        // something broke
    });
```

### unsubscribe()

```js
ScreenStatus
    .unsubscribe()
    .then(function () {
        // unsubscribed
    })
    .catch(function (err) {
        // something broke
    });
```

---
_Source: https://npm.io/package/cordova-plugin-screenstatus · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
