getNotifications

suspend fun getNotifications(bufferSize: Int = 0, bufferOverflow: BufferOverflow = BufferOverflow.DROP_OLDEST): Flow<DataByteArray>

Enables and observes notifications/indications of the characteristic. After subscriber is closed the notifications should be disabled.

It is suspend function which suspends and waits for result. It will also suspend when other request is already being executed.

Return

Flow which emits new bytes on notification.

Throws

when a BLE device is disconnected.