rawFrameFlow

val rawFrameFlow: SharedFlow<ByteArray>(source)

Flow emitting every raw BLE characteristic notification received from the connected device as a defensive copy of the original byte array.

This flow can be collected to implement raw frame logging, packet inspection, or custom decoding pipelines independent from the built-in protocol decoder.

Threading notes:

  • Emissions originate from BLE callback handling and therefore must be treated as background events.

  • Collectors are responsible for choosing the appropriate collection context.

Example:

bleManager.rawFrameFlow.collect { bytes ->
outputStream.write(bytes)
}