0.1.12 • Published 1 month ago

@capacitor/watch v0.1.12

Weekly downloads
-
License
MIT
Repository
github
Last release
1 month ago

@ionic-enterprise/capWatch

Provide Watch connectivity for Capacitor

Install

npm install @ionic-enterprise/capWatch
npx cap sync

API

addListener('runCommand', ...)

addListener(eventName: 'runCommand', listenerFunc: (data: { command: string; }) => void) => Promise<PluginListenerHandle> & PluginListenerHandle

Listen for a command from the watch

ParamType
eventName'runCommand'
listenerFunc(data: { command: string; }) => void

Returns: Promise<PluginListenerHandle> & PluginListenerHandle


updateWatchUI(...)

updateWatchUI(options: { watchUI: string; }) => Promise<void>

Replaces the current watch UI with watchUI

ParamType
options{ watchUI: string; }

updateWatchData(...)

updateWatchData(options: { data: { [key: string]: string; }; }) => Promise<void>

Updates the watch's state data

ParamType
options{ data: { key: string: string; }; }

Interfaces

PluginListenerHandle

PropType
remove() => Promise<void>