AndroidPeripheral
Types
Represents possible write operation results, as defined by Android's WriteOperationReturnValues IntDef
.
Properties
Returns the hardware address of this AndroidPeripheral.
Platform specific identifier for the remote peripheral. On some platforms, this can be used to "restore" a previously known peripheral for reconnection.
StateFlow of the most recently negotiated MTU. The MTU will change upon a successful request to change the MTU (via requestMtu), or if the peripheral initiates an MTU change. StateFlow's value
will be null
until MTU is negotiated.
The list of services (GATT profile) which have been discovered on the remote peripheral.
Provides a conflated Flow of the Peripheral's State.
Get the type of the peripheral.
Functions
Disconnects the active connection, or cancels an in-flight connection attempt, suspending until Peripheral has settled on a disconnected state.
Observes changes to the specified Characteristic.
Reads data from characteristic.
Reads data from descriptor.
Requests that the current connection's MTU be changed. Suspends until the MTU changes, or failure occurs. The negotiated MTU value is returned, which may not be mtu value requested if the remote peripheral negotiated an alternate MTU.