Skip to content

kolbasa/cordova-plugin-buttons

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

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

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published