love-alarm-ble
TypeScript icon, indicating that this package has built-in type declarations

0.0.1 • Public • Published

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>
Param Type
options InitOptions

advertise()

advertise() => Promise<void>

stopAdvertise()

stopAdvertise() => Promise<void>

scan(...)

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

stopScan()

stopScan() => Promise<void>

read(...)

read(options: ReadOptions) => Promise<ReadResult>
Param Type
options ReadOptions

Returns: Promise<ReadResult>


addListener(string, ...)

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


Interfaces

InitOptions

Prop Type
advertising string

ScanResult

Prop Type
address any
name string

ReadResult

Prop Type
address string
name string
profile string

ReadOptions

Prop Type
address string

PluginListenerHandle

Prop Type
remove () => Promise<void>

Readme

Keywords

Package Sidebar

Install

npm i love-alarm-ble

Weekly Downloads

0

Version

0.0.1

License

MIT

Unpacked Size

77.8 kB

Total Files

41

Last publish

Collaborators

  • tiendat