createBond

abstract fun createBond(): Boolean

This method should initiate bonding with the peripheral.

This method is guaranteed to be called only when the bond information does not exist.

The result should be reported by emitting state BondState.BONDED (in case of a success) or BondState.NONE (in case of a failure) to bondState flow.

Throws

If BLUETOOTH_CONNECT permission is denied.