1.0.2 • Published 2 years ago
cordova-plugin-buttons v1.0.2
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
});