BluetoothHidDevice.Connect(BluetoothDevice) 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
啟動與目前與此裝置配對的主機連線。
[Android.Runtime.Register("connect", "(Landroid/bluetooth/BluetoothDevice;)Z", "", ApiSince=28)]
[Android.Runtime.RequiresPermission("android.permission.BLUETOOTH_CONNECT")]
public bool Connect(Android.Bluetooth.BluetoothDevice? device);
[<Android.Runtime.Register("connect", "(Landroid/bluetooth/BluetoothDevice;)Z", "", ApiSince=28)>]
[<Android.Runtime.RequiresPermission("android.permission.BLUETOOTH_CONNECT")>]
member this.Connect : Android.Bluetooth.BluetoothDevice -> bool
參數
- device
- BluetoothDevice
傳回
如果指令成功傳送,則為真;否則為假。
- 屬性
備註
啟動與目前與此裝置配對的主機連線。 如果應用程式未註冊,#connect(藍牙裝置)將會失敗。 應用程式應透過處理 Callback#onConnectionStateChanged 的回撥來追蹤連線狀態。 連線狀態與此方法的回傳值無關。
Java 文件 android.bluetooth.BluetoothHidDevice.connect(android.bluetooth.BluetoothDevice)。
本頁部分內容為基於 Open Source Project 所創建與分享的作品,並依授權條款所描述的使用進行修改。