語言

BluetoothDevice.GetBondStatus(Int32) 方法

定義

回傳此裝置的綁定狀態。

[Android.Runtime.Register("getBondStatus", "(I)Landroid/bluetooth/BondStatus;", "", ApiSince=37)]
[Android.Runtime.RequiresPermission("android.permission.BLUETOOTH_CONNECT")]
public Android.Bluetooth.BondStatus? GetBondStatus(int transport);
[<Android.Runtime.Register("getBondStatus", "(I)Landroid/bluetooth/BondStatus;", "", ApiSince=37)>]
[<Android.Runtime.RequiresPermission("android.permission.BLUETOOTH_CONNECT")>]
member this.GetBondStatus : int -> Android.Bluetooth.BondStatus

參數

transport
Int32

交通工具是為了取得保釋狀態。

傳回

此裝置的鍵結狀態,若未鍵結則為零。

屬性

備註

回傳此裝置的綁定狀態。 針對Build.VERSION_CODES的應用程式。若為 S 或更高,則需取得 Manifest.permission.BLUETOOTH_CONNECT 權限,可透過 android.app.Activity.requestPermissions(String[],int)取得。 需要Manifest.permission.BLUETOOTH_CONNECT

Android 參考資料。android.bluetooth.BluetoothDevice.getBondStatus

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

適用於