Ionic capacitor to connect Polar H10 band to ionic app
npm install capacitor-polar-sdk
npx cap sync
connectPolar()
streamHR()
streamEcg()
stopHR()
stopEcg()
disconnectPolar()
addListener('hrData', ...)
addListener('ecgData', ...)
addListener('disconnected', ...)
removeAllListeners()
- Interfaces
connectPolar() => Promise<{ value: boolean; message?: string; }>
Returns: Promise<{ value: boolean; message?: string; }>
streamHR() => Promise<{ value: boolean; }>
Returns: Promise<{ value: boolean; }>
streamEcg() => Promise<{ value: boolean; }>
Returns: Promise<{ value: boolean; }>
stopHR() => Promise<{ value: boolean; }>
Returns: Promise<{ value: boolean; }>
stopEcg() => Promise<{ value: boolean; }>
Returns: Promise<{ value: boolean; }>
disconnectPolar() => Promise<{ value: boolean; }>
Returns: Promise<{ value: boolean; }>
addListener(eventName: 'hrData', data: any) => Promise<PluginListenerHandle>
Param | Type |
---|---|
eventName |
'hrData' |
data |
any |
Returns: Promise<PluginListenerHandle>
addListener(eventName: 'ecgData', data: any) => Promise<PluginListenerHandle>
Param | Type |
---|---|
eventName |
'ecgData' |
data |
any |
Returns: Promise<PluginListenerHandle>
addListener(eventName: 'disconnected', data: any) => Promise<PluginListenerHandle>
Param | Type |
---|---|
eventName |
'disconnected' |
data |
any |
Returns: Promise<PluginListenerHandle>
removeAllListeners() => Promise<void>
Prop | Type |
---|---|
remove |
() => Promise<void> |