dataOrEmptyFlow

fun Flow<ConnectableDevice?>.dataOrEmptyFlow(serviceUUID: String, characteristicUUID: String): Flow<ByteArray>

Provides access to device data flow by service and characteristic string uuids. Emits and empty ByteArray if the service cannot be found.

Return

the Flow of the ByteArray value of the RemoteCharacteristic associated with serviceUUID and characteristicUUID. Emits an empty ByteArray if the characteristic is not available.

Parameters

serviceUUID

string service uuid representation

characteristicUUID

string characteristic uuid representation

Throws