connect
abstract suspend fun connect(autoConnect: Boolean, autoMtu: Boolean, opportunistic: Boolean = false)
Makes a connection to the peripheral.
This method may be called multiple times in case of a retry (when autoConnect is false).
Parameters
autoConnect
True to use auto connect feature, false to use direct connection.
autoMtu
True to enable automatic MTU negotiation.
opportunistic
True to enable opportunistic connection.
Throws
If BLUETOOTH_CONNECT permission is denied.