0.0.1 ā€¢ Published 2 years ago

love-alarm-ble v0.0.1

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

love-alarm-ble

šŸ”Œ Bluetooth Low Energy (BLE) Plugin for Love Alarm app

Install

npm install love-alarm-ble
npx cap sync

API

initialize(...)

initialize(options: InitOptions) => Promise<void>
ParamType
optionsInitOptions

advertise()

advertise() => Promise<void>

stopAdvertise()

stopAdvertise() => Promise<void>

scan(...)

scan(callback: (result: ScanResult) => void) => Promise<void>
ParamType
callback(result: ScanResult) => void

stopScan()

stopScan() => Promise<void>

read(...)

read(options: ReadOptions) => Promise<ReadResult>
ParamType
optionsReadOptions

Returns: Promise<ReadResult>


addListener(string, ...)

addListener(eventName: string, listenerFunc: (event: any) => void) => PluginListenerHandle
ParamType
eventNamestring
listenerFunc(event: any) => void

Returns: PluginListenerHandle


addListener('onScanResult', ...)

addListener(eventName: 'onScanResult', listenerFunc: (result: any) => void) => PluginListenerHandle
ParamType
eventName'onScanResult'
listenerFunc(result: any) => void

Returns: PluginListenerHandle


Interfaces

InitOptions

PropType
advertisingstring

ScanResult

PropType
addressany
namestring

ReadResult

PropType
addressstring
namestring
profilestring

ReadOptions

PropType
addressstring

PluginListenerHandle

PropType
remove() => Promise<void>