disconnect

Disconnects from the peripheral.

The result should be reported by emitting ConnectionStateChanged event to events flow.

Return

True if disconnection was requested successfully; false otherwise.

Parameters

reason

The reason for disconnection, returned by ConnectionState.Disconnected.reason.

Throws

If BLUETOOTH_CONNECT permission is denied.