BluetoothGattServer.Connect(BluetoothDevice, Boolean) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Initiate a connection to a Bluetooth GATT capable device.
[Android.Runtime.Register("connect", "(Landroid/bluetooth/BluetoothDevice;Z)Z", "")]
[Android.Runtime.RequiresPermission("android.permission.BLUETOOTH_CONNECT")]
public bool Connect (Android.Bluetooth.BluetoothDevice? device, bool autoConnect);
[<Android.Runtime.Register("connect", "(Landroid/bluetooth/BluetoothDevice;Z)Z", "")>]
[<Android.Runtime.RequiresPermission("android.permission.BLUETOOTH_CONNECT")>]
member this.Connect : Android.Bluetooth.BluetoothDevice * bool -> bool
Parameters
- device
- BluetoothDevice
- autoConnect
- Boolean
Whether to directly connect to the remote device (false) or to automatically connect as soon as the remote device becomes available (true).
Returns
true, if the connection attempt was initiated successfully
- Attributes
Remarks
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.