cordova-plugin-buttons

1.0.2 • Public • Published

Cordova Buttons Plugin

This plugin allows you to listen to the hardware buttons on Android devices.

Installation

Cordova

cordova plugin add cordova-plugin-buttons

Ionic + Cordova

ionic cordova plugin add cordova-plugin-buttons

Capacitor

npm install cordova-plugin-buttons

API

subscribe()

Buttons
    .subscribe(function(button) {
        // your callback
    })
    .then(function () {
        // started
    })
    .catch(function (err) {
        // something broke
    });

unsubscribe()

Buttons
    .unsubscribe()
    .then(function () {
        // stopped
    })
    .catch(function (err) {
        // something broke
    });

Dependencies (0)

    Dev Dependencies (0)

      Package Sidebar

      Install

      npm i cordova-plugin-buttons

      Weekly Downloads

      1

      Version

      1.0.2

      License

      MIT

      Unpacked Size

      10.7 kB

      Total Files

      8

      Last publish

      Collaborators

      • kolbasa