BondState

sealed class BondState

The state of the bond between the Android device and a peripheral, as seen by the system.

Bonded means that this Android device (the central) stores the bond information (keys) associated with the address of the peripheral. It is independent of the connection: the bond exists when the peripheral is not connected. It does not say that the peripheral has the bond information as well, and it does not mean that the link is encrypted, see EncryptionState. Android stores the keys also when the pairing was requested without bonding.

See also

Inheritors

Types

Link copied to clipboard
data object Bonded : BondState

The central has the bond information associated with the peripheral.

Link copied to clipboard
data object Bonding : BondState

The central is bonding with the peripheral.

Link copied to clipboard
data class None(val reason: BondState.Reason? = null) : BondState

The central has no bond information associated with the peripheral.

Link copied to clipboard
sealed class Reason

The reason why a device is not bonded after the bonding process, or after it had been bonded.