Package-level declarations

Functions

Link copied to clipboard
suspend fun Flow<ConnectableDevice?>.characteristic(serviceUUID: String, characteristicUUID: String): RemoteCharacteristic

Provides access to RemoteCharacteristic by service and characteristic string uuids. The method will suspend if characteristic is not available.

Link copied to clipboard
fun Flow<ConnectableDevice?>.characteristicFlow(serviceUUID: String, characteristicUUID: String): Flow<RemoteCharacteristic>

Provides access to RemoteCharacteristic's flow by service and characteristic string uuids. Only emits after services have been discovered.

Link copied to clipboard
suspend fun Flow<ConnectableDevice?>.characteristicOrNull(serviceUUID: String, characteristicUUID: String): RemoteCharacteristic?

Provides access to RemoteCharacteristic by service and characteristic string uuids or null if not available.

Link copied to clipboard
fun Flow<ConnectableDevice?>.characteristicOrNullFlow(serviceUUID: String, characteristicUUID: String): Flow<RemoteCharacteristic?>

Provides access to RemoteCharacteristic's flow by service and characteristic string uuids. Emits null if the characteristic cannot be found.

Link copied to clipboard
fun Flow<ConnectableDevice?>.dataFlow(serviceUUID: String, characteristicUUID: String): Flow<ByteArray>

Provides access to device data flow by service and characteristic string uuids. Only emits after services have been discovered.

inline fun <T> Flow<ConnectableDevice?>.dataFlow(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. Only emits after services have been discovered.

Link copied to clipboard
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.

Link copied to clipboard
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.

Link copied to clipboard
suspend fun Flow<ConnectableDevice?>.descriptor(serviceUUID: String, characteristicUUID: String, descriptorUUID: String): RemoteDescriptor

Provides access to RemoteDescriptor by service, characteristic and descriptor string uuids. The method will suspend if descriptor is not available.

Link copied to clipboard
fun Flow<ConnectableDevice?>.descriptorFlow(serviceUUID: String, characteristicUUID: String, descriptorUUID: String): Flow<RemoteDescriptor>

Provides access to RemoteDescriptor's flow by service, characteristic, and descriptor string uuids. Only emits after services have been discovered.

Link copied to clipboard
fun Flow<ConnectableDevice?>.descriptorOrNullFlow(serviceUUID: String, characteristicUUID: String, descriptorUUID: String): Flow<RemoteDescriptor?>

Provides access to RemoteDescriptor's flow by service, characteristic, and descriptor string uuids. Emits null if the descriptor cannot be found.

Link copied to clipboard
suspend fun Flow<ConnectableDevice?>.service(serviceUUID: String): RemoteService

Provides access to RemoteService by service string uuids. The method will suspend until services have been discovered.

Link copied to clipboard
fun Flow<ConnectableDevice?>.serviceFlow(serviceUUID: String): Flow<RemoteService>

Provides access to a RemoteService by service string uuids. Only emits after services have been discovered.

Link copied to clipboard
suspend fun Flow<ConnectableDevice?>.serviceOrNull(serviceUUID: String): RemoteService?

Provides access to RemoteService by service and characteristic string uuids or null if not available.

Link copied to clipboard
fun Flow<ConnectableDevice?>.serviceOrNullFlow(serviceUUID: String): Flow<RemoteService?>

Provides access to a RemoteService by service string uuids. Emits null if the service cannot be found.