bond

fun bond(): Flow<BondState>

Initiates the bonding (pairing) process with the BLE device.

Bonding creates a trusted relationship between the Android device and the BLE peripheral, enabling encrypted communication and persistent pairing information. This method requires a BondManager to be provided during construction.

The returned Flow emits BondState updates as the bonding process progresses, including states such as BondState.Bonding, BondState.Bonded, and BondState.NotBonded.

Return

A Flow emitting BondState updates during the bonding process. Returns an empty flow if no BondManager was provided during construction.

See also