0.0.9 • Published 2 years ago

cap-home-button v0.0.9

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

cap-home-button

A capacitor plugin with a listener for when the home button is pressed.

Install

npm install cap-home-button
npx cap sync

API

addListener('homePress', ...)

addListener(eventName: 'homePress', listenerFunc: (result: CapHomeButtonResult) => void) => Promise<PluginListenerHandle> & PluginListenerHandle

Listens to button presses.

ParamTypeDescription
eventName'homePress'only homePress is supported
listenerFunc(result: CapHomeButtonResult) => voidcalled on button press with a reason. Reason can be 'homekey', 'recentapps', 'dream', 'voiceinteraction', or similar.

Returns: Promise<PluginListenerHandle> & PluginListenerHandle


Interfaces

PluginListenerHandle

PropType
remove() => Promise<void>

CapHomeButtonResult

PropType
reasonstring
0.0.9

2 years ago

0.0.7

3 years ago

0.0.6

3 years ago

0.0.5

3 years ago

0.0.4

3 years ago

0.0.3

3 years ago

0.0.2

3 years ago

0.0.1

3 years ago