# cordova-plugin-wakeuptimer-jk

> Wakeup Plugin

Latest version **1.1.5** (published 2017-03-01) · Apache 2.0 license · 0 weekly downloads

## Install

```sh
npm install cordova-plugin-wakeuptimer-jk
pnpm add cordova-plugin-wakeuptimer-jk
yarn add cordova-plugin-wakeuptimer-jk
bun add cordova-plugin-wakeuptimer-jk
```

## 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.1.5 |
| Published | 2017-03-01 |
| First published | 2017-02-28 |
| Weekly downloads | 0 |
| License | Apache 2.0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 4 |
| Author | jkhax0r |
| Maintainers | jkhax0r |
| Keywords | sleep, wakeup, timer, ecosystem:cordova, cordova-android |

## Links

- npm: https://www.npmjs.com/package/cordova-plugin-wakeuptimer-jk
- Repository: https://github.com/jkhax0r/cordova-plugin-wakeuptimer
- Homepage: https://github.com/jkhax0r/cordova-plugin-wakeuptimer#readme
- Issues: https://github.com/jkhax0r/cordova-plugin-wakeuptimer/issues
- npm.io page: https://npm.io/package/cordova-plugin-wakeuptimer-jk

## Alternatives

- [@sindresorhus/slugify](https://npm.io/package/@sindresorhus/slugify.md) — 3.7M weekly downloads
- [solid-js](https://npm.io/package/solid-js.md) — 2.7M weekly downloads
- [expo-glass-effect](https://npm.io/package/expo-glass-effect.md) — 2.5M weekly downloads
- [nanoassert](https://npm.io/package/nanoassert.md) — 780.8K weekly downloads
- [@ffmpeg/ffmpeg](https://npm.io/package/@ffmpeg/ffmpeg.md) — 529.5K weekly downloads

## Recent versions

- 1.1.5 (latest) — 2017-03-01
- 1.1.4 — 2017-03-01
- 1.1.3 — 2017-03-01
- 1.1.2 — 2017-03-01
- 1.1.1 — 2017-03-01
- 1.1.0 — 2017-03-01
- 1.0.10 — 2017-03-01
- 1.0.9 — 2017-03-01
- 1.0.8 — 2017-03-01
- 1.0.6 — 2017-03-01
- 1.0.5 — 2017-03-01
- 1.0.4 — 2017-03-01
- 1.0.3 — 2017-03-01
- 1.0.2 — 2017-02-28
- 1.0.1 — 2017-02-28

## README

# Wakeup/Alarm Clock PhoneGap/Cordova Plugin

### Platform Support

This plugin supports PhoneGap/Cordova apps running on both iOS and Android.

### Version Requirements

This plugin is meant to work with Cordova 3.5.0+.

## Installation

#### Automatic Installation using PhoneGap/Cordova CLI (iOS and Android)
1. Make sure you update your projects to Cordova iOS version 3.5.0+ before installing this plugin.

        cordova platform update ios
        cordova platform update android

2. Install this plugin using PhoneGap/Cordova cli:

        cordova plugin add https://github.com/wnyc/cordova-plugin-wakeuptimer.git

## Usage

    // all responses from the audio player are channeled through successCallback and errorCallback

    // set wakeup timer
    window.wakeuptimer.wakeup( successCallback,
       errorCallback,
       // a list of alarms to set
       {
            alarms : [{
                type : 'onetime',
                time : { hour : 14, minute : 30 },
                extra : { message : 'json containing app-specific information to be posted when alarm triggers' },
                message : 'Alarm has expired!'
           }]
       }
    );

    // set repeating wakeup timer
    window.wakeuptimer.wakeup( successCallback,
       errorCallback,
       // a list of alarms to set
       {
            alarms : [{
                type : 'repeating',
                time : { minutes : 10 },
                extra : { message : 'json containing app-specific information to be posted when alarm triggers' },
                message : 'Alarm has expired!'
           }]
       }
    );

    // set timer, but skip launch if user is using the phone (screen is on)
    window.wakeuptimer.wakeup( successCallback,
       errorCallback,
       // a list of alarms to set
       {
            alarms : [{
                type : 'onetime',
                skipOnAwake: true,
                time : { hour : 12, minute : 10 },
                extra : { message : 'json containing app-specific information to be posted when alarm triggers' },
                message : 'Alarm has expired!'
           }]
       }
    );

    // set wakeup timer, but skip launch if app is already running
    window.wakeuptimer.wakeup( successCallback,
       errorCallback,
       // a list of alarms to set
       {
            alarms : [{
                type : 'onetime',
                skipOnRunning: true,
                time : { hour : 11, minute : 20 },
                extra : { message : 'json containing app-specific information to be posted when alarm triggers' },
                message : 'Alarm has expired!'
           }]
       }
    );

    // snooze...
    window.wakeuptimer.snooze( successCallback,
        errorCallback,
        {
            alarms : [{
                type : 'snooze',
                time : { seconds : 60 }, // snooze for 60 seconds
                extra : { }, // json containing app-specific information to be posted when alarm triggers
                message : this.get('message'),
                sound : this.get('sound'),
                action : this.get('action')
            }]
        }
     );

    // example of a callback method
    var successCallback = function(result) {
        if (result.type==='wakeup') {
            console.log('wakeup alarm detected--' + result.extra);
        } else if(result.type==='set'){
            console.log('wakeup alarm set--' + result);
        } else {
            console.log('wakeup unhandled type (' + result.type + ')');
        }
    };

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