An open API service indexing awesome lists of open source software.

https://github.com/kolbasa/cordova-plugin-buttons

This plugin allows you to listen to the hardware buttons on Android devices.
https://github.com/kolbasa/cordova-plugin-buttons

buttons cordova hardware listener

Last synced: 8 months ago
JSON representation

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

Awesome Lists containing this project

README

          

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

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

### unsubscribe()

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