Device

interface Device

A Bluetooth device that can be connected to

Inheritors

Properties

Link copied to clipboard
abstract val identifier: Identifier

The Identifier of the device

Link copied to clipboard
abstract val info: Flow<DeviceInfo>

A Flow of the latest DeviceInfo of the device

Link copied to clipboard
abstract val state: Flow<DeviceState>

A Flow of the latest DeviceState of the device

Functions

Link copied to clipboard
abstract fun advertisementDataDidUpdate(advertisementData: BaseAdvertisementData)

Notifies the device that the BaseAdvertisementData has updated

Link copied to clipboard
open suspend fun connect(reconnectionSettings: ConnectionSettings.ReconnectionSettings? = null): Boolean

Attempts to connect to the device

Link copied to clipboard
open suspend fun disconnect()

Attempts to disconnect from the device

Link copied to clipboard
abstract fun handleConnected()

Notifies the device that is has connected

Link copied to clipboard
abstract fun handleDisconnected()

Notifies the device that is has disconnected

Link copied to clipboard
abstract fun rssiDidUpdate(rssi: RSSI)

Notifies the device that the RSSI has updated