-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
Hi. I appreciate you creating this package. Helps me a lot.
I noticed that this package, on onConnectionStateChanged manager function, doesn't forward the whole object, instead just the state name and error message if there's any
onConnectionStateChanged(data: {
state: ConnectionState
error: BleErrorCode | null
message: string
android?: { status: number }
ios?: { code: number; description: string }
services?: BleServiceInfo[]
}): void
onConnectionStateChanged(callback: (state: ConnectionState, error: BleError | null) => void): EventSubscription {
return ReactNativeBleLibraryModule.addListener('onConnectionStateChanged', ({ state, error, message }) => {
if (error) {
callback(state, new BleError(error as BleErrorCode, message))
} else {
callback(state, null)
}
})
}
So I need to do something like this to get the list of services
const subscription = ReactNativeBleLibraryModule.addListener("onConnectionStateChanged", () => {})
Metadata
Metadata
Assignees
Labels
No labels