ConnectableDevice
A Device that can be connected to
Inheritors
Properties
A StateFlow of the latest DeviceInfo of the device
A Flow of the latest DeviceState of the device
Functions
Notifies the device that the BaseAdvertisementData has updated
Attempts to connect to the device
Attempts to disconnect from the device
Gets a (Flow of) the list of Service associated with the ConnectableDevice This will automatically discover services if the device is in a ConnectableDeviceState.Connected.NoServices state. This differs from services in that the resulting flow will only emit once services are discovered.
Gets the (Flow of) the distance in meters between the scanner and a ConnectableDevice. To get a more stable result, this method will average the distance over the last averageOver results.
Gets a (Flow of) ConnectableDeviceState.Connected.DiscoveredServices from a ConnectableDevice This will automatically start discovering services if the device is in a ConnectableDeviceState.Connected.NoServices state.
Notifies the device that is has connected
Notifies the device that is has disconnected
Gets the (Flow of) the MTU from a ConnectableDevice
Attempts to request a MTU size for the ConnectableDevice from a ConnectableDevice
Notifies the device that the RSSI has updated
Gets a (Flow of) the list of Service associated with the ConnectableDevice This will automatically discover services if the device is in a ConnectableDeviceState.Connected.NoServices state.
Attempts to request an update to the RSSI of the ConnectableDevice from a ConnectableDevice When this method completes, the devices should have had ConnectableDeviceState.Connected.readRssi called