AndroidBleConnection
class AndroidBleConnection(centralManager: CentralManager, scope: CoroutineScope, tag: String = "BLE") : BleConnection(source)
An Android implementation of BleConnection using Nordic's CentralManager.
Parameters
centralManager
The Nordic CentralManager to use for connection.
scope
The CoroutineScope in which to monitor connection state.
tag
A tag for logging.
Properties
Link copied to clipboard
A flow of BleConnectionState changes.
Link copied to clipboard
A flow of the current device.
Functions
Link copied to clipboard
open suspend override fun connectAndAwait(device: BleDevice, timeoutMs: Long, onRegister: suspend () -> Unit = {}): BleConnectionState
Connects to the given BleDevice and waits for a terminal state.
Link copied to clipboard
Disconnects from the current device.
Link copied to clipboard
Returns the maximum write value length for the given write type.
Link copied to clipboard
open suspend override fun <T> profile(serviceUuid: Uuid, timeout: Duration, setup: suspend CoroutineScope.(BleService) -> T): T
abstract suspend fun <T> profile(serviceUuid: ERROR CLASS: Symbol not found for Uuid, timeout: ERROR CLASS: Symbol not found for Duration = 30.seconds, setup: suspend ERROR CLASS: Symbol not found for CoroutineScope.(BleService) -> T): T
Executes a block within a discovered profile.
Link copied to clipboard
Requests a new connection priority for the current peripheral.