🔌 Bluetooth Low Energy (BLE) Plugin for Love Alarm app
npm install love-alarm-ble
npx cap sync
initialize(options: InitOptions) => Promise<void>
advertise() => Promise<void>
stopAdvertise() => Promise<void>
scan(callback: (result: ScanResult) => void) => Promise<void>
stopScan() => Promise<void>
read(options: ReadOptions) => Promise<ReadResult>
Returns: Promise<ReadResult>
addListener(eventName: string, listenerFunc: (event: any) => void) => PluginListenerHandle
Param |
Type |
eventName |
string |
listenerFunc |
(event: any) => void |
Returns: PluginListenerHandle
addListener('onScanResult', ...)
addListener(eventName: 'onScanResult', listenerFunc: (result: any) => void) => PluginListenerHandle
Param |
Type |
eventName |
'onScanResult' |
listenerFunc |
(result: any) => void |
Returns: PluginListenerHandle
Prop |
Type |
advertising |
string |
Prop |
Type |
address |
any |
name |
string |
Prop |
Type |
address |
string |
name |
string |
profile |
string |
Prop |
Type |
remove |
() => Promise<void> |