ConnectableDeviceStateImplRepo
A BaseConnectableDeviceStateRepo managed by a DeviceConnectionManager
Parameters
the default ConnectionSettings.ReconnectionSettings to use when reconnecting after the device disconnects unexpectedly
the DeviceConnectionManager to manage the ConnectableDeviceState
the CoroutineContext of this repo
Constructors
Properties
Functions
Gets the (Flow of) BaseAdvertisementData from a Flow of ConnectableDevice
Provides access to RemoteCharacteristic by service and characteristic string uuids. The method will suspend if characteristic is not available.
Provides access to RemoteCharacteristic's flow by service and characteristic string uuids. Only emits after services have been discovered.
Provides access to RemoteCharacteristic by service and characteristic string uuids or null if not available.
Provides access to RemoteCharacteristic's flow by service and characteristic string uuids. Emits null if the characteristic cannot be found.
Gets a (Flow of) the list RemoteCharacteristic associated with the RemoteService in a Flow
Attempts to connect to the ConnectableDevice from a Flow of ConnectableDevice When this method completes, the devices should be in a ConnectableDeviceState.Connected state
Provides access to device data flow by service and characteristic string uuids. Only emits after services have been discovered.
Provides access to device data flow T by service and characteristic string uuids. Only emits after services have been discovered.
Provides access to device data flow by service and characteristic string uuids. Emits and empty ByteArray if the service cannot be found.
Provides access to device data flow T by service and characteristic string uuids. Emits null if the descriptor cannot be found.
Provides access to RemoteDescriptor by service, characteristic and descriptor string uuids. The method will suspend if descriptor is not available.
Provides access to RemoteDescriptor's flow by service, characteristic, and descriptor string uuids. Only emits after services have been discovered.
Provides access to RemoteDescriptor's flow by service, characteristic, and descriptor string uuids. Emits null if the descriptor cannot be found.
Gets a (Flow of) the list RemoteDescriptor associated with the RemoteCharacteristic in a Flow
Attempts to disconnect to the ConnectableDevice from a Flow of ConnectableDevice When this method completes, the devices should be in a ConnectableDeviceState.Disconnected state
Gets a (Flow of) the list of Service associated with the ConnectableDevice in a Flow 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 Flow of ConnectableDevice. To get a more stable result, this method will average the distance over the last averageOver results.
Gets a (Flow of) ConnectableDevice with a given Identifier from a Flow of a list of ConnectableDevice.
Gets a (Flow of) the list RemoteService that are included with the RemoteService in a Flow
Gets the (Flow of) DeviceInfo from a Flow of ConnectableDevice
Gets the (Flow of) the MTU from a Flow of ConnectableDevice
Pairs a (Flow of) ConnectableDevice by waiting for it to become connected and calling [ConnectableDeviceState.Connected.pair]
Attempts to request a MTU size for the ConnectableDevice from a Flow of ConnectableDevice
Gets the (Flow of) the RSSI value from a Flow of ConnectableDevice
Provides access to RemoteService by service string uuids. The method will suspend until services have been discovered.
Provides access to a RemoteService by service string uuids. Only emits after services have been discovered.
Provides access to RemoteService by service and characteristic string uuids or null if not available.
Provides access to a RemoteService by service string uuids. Emits null if the service cannot be found.
Gets a (Flow of) the list of Service associated with the ConnectableDevice in a Flow This will automatically discover services if the device is in a ConnectableDeviceState.Connected.NoServices state.
Gets a (Flow of) DeviceState from a Flow or ConnectableDevice
Pairs a (Flow of) ConnectableDevice by calling [ConnectableDeviceState.unpair] on the first ConnectableDeviceState
Attempts to request an update to the RSSI of the ConnectableDevice from a Flow of ConnectableDevice When this method completes, the devices should have had ConnectableDeviceState.Connected.readRssi called
Gets a (Flow of) the ByteArray value from a Flow of an RemoteCharacteristic This method will automatically subscribe/unsubscribe to the RemoteCharacteristic when the Flow is collected
Gets a (Flow of) T value from a Flow of an RemoteCharacteristic This method will automatically subscribe/unsubscribe to the RemoteCharacteristic when the Flow is collected
Gets a (Flow of) the ByteArray value from a Flow of an RemoteCharacteristic or an empty ByteArray if data is unavailable This method will automatically subscribe/unsubscribe to the RemoteCharacteristic when the Flow is collected
Gets a (Flow of) T value from a Flow of an RemoteCharacteristic This method will automatically subscribe/unsubscribe to the RemoteCharacteristic when the Flow is collected
Gets a (Flow of) T value from a Flow of an RemoteCharacteristic or null if data is unavailable This method will automatically subscribe/unsubscribe to the RemoteCharacteristic when the Flow is collected