connect
Initiate a connection to a Bluetooth GATT capable device.
The connection may not be established right away, but will be completed when the remote device is available. A OnClientConnectionStateChanged event will be triggered when the connection state changes as a result of this function.
The autoConnect parameter determines whether to actively connect to the remote device, or rather passively scan and finalize the connection when the remote device is in range/available. Generally, the first ever connection to a device should be direct (autoConnect set to false) and subsequent connections to known devices should be invoked with the autoConnect parameter set to true.
Parameters
The remote device.
Whether to directly connect to the remote device (false) or to automatically connect as soon as the remote device becomes available (true).
See also
(https://developer.android.com/reference/android/bluetooth/BluetoothGattServer#connect(android.bluetooth.BluetoothDevice,%20boolean))