dataOrNullFlow

inline fun <T> Flow<ConnectableDevice?>.dataOrNullFlow(serviceUUID: String, characteristicUUID: String, deserializationStrategy: DeserializationStrategy<T>, bluetoothFormat: BluetoothFormat = BluetoothFormat): Flow<T?>

Provides access to device data flow T by service and characteristic string uuids. Emits null if the descriptor cannot be found.

Return

the Flow of the T value of the RemoteCharacteristic associated with serviceUUID and characteristicUUID. Emits null if the descriptor cannot be found.

Parameters

serviceUUID

string service uuid representation

characteristicUUID

string characteristic uuid representation

deserializationStrategy

the DeserializationStrategy to use to deserialize the ByteArray to T

bluetoothFormat

the BluetoothFormat to use to deserialize the ByteArray to T

Type Parameters

T

the type of the data to receive

Throws