AndroidBluetoothRepository

class AndroidBluetoothRepository(dispatchers: CoroutineDispatchers, processLifecycle: Lifecycle, centralManager: CentralManager, androidEnvironment: AndroidEnvironment) : BluetoothRepository(source)

Android implementation of BluetoothRepository.

Constructors

Link copied to clipboard
constructor(dispatchers: CoroutineDispatchers, processLifecycle: Lifecycle, centralManager: CentralManager, androidEnvironment: AndroidEnvironment)

Properties

Link copied to clipboard
open override val state: StateFlow<BluetoothState>

The current state of Bluetooth on the device.

Functions

Link copied to clipboard
open suspend override fun bond(device: BleDevice)

Initiates bonding with the given device.

Link copied to clipboard
open override fun isBonded(address: String): Boolean

Returns true if the given address is bonded.

Link copied to clipboard
open override fun isValid(bleAddress: String): Boolean

Returns true if the given address is valid.

Link copied to clipboard
open override fun refreshState()

Refreshes the Bluetooth state.