DeviceConnectionManager

A manager for connecting a Device

Inheritors

Types

Link copied to clipboard
interface Builder

Builder for creating a BaseDeviceConnectionManager

Link copied to clipboard
sealed class Event

Events detected by a DeviceConnectionManager

Link copied to clipboard

Properties

Link copied to clipboard

A Flow of all the Event detected by the connection manager

Link copied to clipboard
abstract val rssi: Flow<RSSI>

A Flow of the RSSI value of the device

Functions

Link copied to clipboard
Link copied to clipboard
abstract fun connect()

Starts connecting to the device

Link copied to clipboard
abstract fun disconnect()

Starts disconnecting from the device

Link copied to clipboard
abstract suspend fun discoverServices()

Starts discovering Service for the device

Link copied to clipboard

Gets the current State of the device

Link copied to clipboard
abstract fun handleConnect()
Link copied to clipboard
abstract fun handleDisconnect(onDisconnect: suspend () -> Unit? = null)
Link copied to clipboard
abstract suspend fun pair()

Pairs the device

Link copied to clipboard
abstract suspend fun performAction(action: DeviceAction)

Starts performing a DeviceAction

Link copied to clipboard
abstract suspend fun readRssi()

Starts reading the latest RSSI value of the device

Link copied to clipboard
abstract suspend fun requestMtu(mtu: MTU): Boolean

Requests an update to the MTU size of the device

Link copied to clipboard
abstract suspend fun reset()

Resets all actions and disconnects the device

Link copied to clipboard
abstract fun startConnecting(reconnectionSettings: ConnectionSettings.ReconnectionSettings? = null)
Link copied to clipboard
Link copied to clipboard
abstract fun startDiscovering()
Link copied to clipboard
abstract suspend fun unpair()

Unpairs from the device