ClientGattEvent

sealed interface ClientGattEvent

An event class which maps BluetoothGattCallback callbacks into data classes.

See also

(https://developer.android.com/reference/android/bluetooth/BluetoothGattCallback)

Inheritors

Types

Link copied to clipboard
data class BondStateChanged(val bondState: BondState) : ClientGattEvent

This is an additional event which doesn't exist in BluetoothGattCallback. It is added here to make events complete, but the source of the emission comes from BondingBroadcastReceiver.

Link copied to clipboard

Event triggered as a result of a remote characteristic notification. Note that the value within the characteristic object may have changed since receiving the remote characteristic notification, so check the parameter value for the value at the time of notification.

Link copied to clipboard

Interface which groups characteristic related events.

Link copied to clipboard

Event reporting the result of a characteristic read operation.

Link copied to clipboard

Event indicating the result of a characteristic write operation.

Link copied to clipboard

Event emitted when GATT client has connected/disconnected to/from a remote GATT server.

Link copied to clipboard

Interface which groups descriptor related event.

Link copied to clipboard

Event reporting the result of a descriptor read operation.

Link copied to clipboard

Event indicating the result of a descriptor write operation.

Link copied to clipboard
data class MtuChanged(val mtu: Int, val status: BleGattOperationStatus) : ClientGattEvent

Event indicating the MTU for a given device connection has changed. This callback is triggered in response to the BluetoothGatt.requestMtu function, or in response to a connection event.

Link copied to clipboard
data class PhyRead(val txPhy: BleGattPhy, val rxPhy: BleGattPhy, val status: BleGattOperationStatus) : ClientGattEvent

Event emitted as result of BluetoothGatt.readPhy.

Link copied to clipboard
data class PhyUpdate(val txPhy: BleGattPhy, val rxPhy: BleGattPhy, val status: BleGattOperationStatus) : ClientGattEvent

Event emitted as result of BluetoothGatt.setPreferredPhy, or as a result of remote device changing the PHY.

Link copied to clipboard
data class ReadRemoteRssi(val rssi: Int, val status: BleGattOperationStatus) : ClientGattEvent

Event reporting the RSSI for a remote device connection. This callback is triggered in response to the BluetoothGatt.readRemoteRssi function.

Link copied to clipboard

Event invoked when a reliable write transaction has been completed.

Link copied to clipboard

An event indicating "service changed" event is received. Receiving this event means that the GATT database is out of sync with the remote device. BluetoothGatt.discoverServices should be called to re-discover the services.

Link copied to clipboard
sealed interface ServiceEvent : ClientGattEvent

Interface which groups service related events.

Link copied to clipboard

Event emitted when the list of remote services, characteristics and descriptors for the remote device have been updated, i.e. new services have been discovered.