語言

BluetoothHidDevice.Disconnect(BluetoothDevice) 方法

定義

與目前連線的主機斷線。

[Android.Runtime.Register("disconnect", "(Landroid/bluetooth/BluetoothDevice;)Z", "", ApiSince=28)]
[Android.Runtime.RequiresPermission("android.permission.BLUETOOTH_CONNECT")]
public bool Disconnect(Android.Bluetooth.BluetoothDevice? device);
[<Android.Runtime.Register("disconnect", "(Landroid/bluetooth/BluetoothDevice;)Z", "", ApiSince=28)>]
[<Android.Runtime.RequiresPermission("android.permission.BLUETOOTH_CONNECT")>]
member this.Disconnect : Android.Bluetooth.BluetoothDevice -> bool

參數

傳回

如果指令成功傳送,則為真;否則為假。

屬性

備註

與目前連線的主機斷線。 應用程式應透過處理 Callback#onConnectionStateChanged 的回撥來追蹤連線狀態。 連線狀態與此方法的回傳值無關。

Java 文件 android.bluetooth.BluetoothHidDevice.disconnect(android.bluetooth.BluetoothDevice)。

本頁部分內容為基於 Open Source Project 所創建與分享的作品,並依授權條款所描述的使用進行修改。

適用於