1.0.1 • Published 4 years ago
@walletfactory/capacitor-plugin-shake v1.0.1
capacitor-plugin-shake
Shake motion
Install
npm install capacitor-plugin-shake
npx cap sync
API
addListener(...)
addListener(eventName: 'shaked', listenerFunc: ShakedListener) => Promise<PluginListenerHandle> & PluginListenerHandle
Add a listener for device shaked motion
Param | Type |
---|---|
eventName | "shaked" |
listenerFunc | () => void |
Returns: Promise<PluginListenerHandle> & PluginListenerHandle
start()
start() => Promise<void>
Start shake wathing
stop()
stop() => Promise<void>
Stop shake wathing
echo(...)
echo(options: { value: string; }) => Promise<{ value: string; }>
Test echo
Param | Type |
---|---|
options | { value: string; } |
Returns: Promise<{ value: string; }>
removeAllListeners()
removeAllListeners() => Promise<void>
Remove all the listeners that are attached to this plugin.
Interfaces
PluginListenerHandle
Prop | Type |
---|---|
remove | () => Promise<void> |