語言

BluetoothHealth.GetConnectionState(BluetoothDevice) 方法

定義

取得該設定檔目前的連線狀態。

[Android.Runtime.Register("getConnectionState", "(Landroid/bluetooth/BluetoothDevice;)I", "")]
[Android.Runtime.RequiresPermission("android.permission.BLUETOOTH_CONNECT")]
public Android.Bluetooth.ProfileState GetConnectionState(Android.Bluetooth.BluetoothDevice? device);
[<Android.Runtime.Register("getConnectionState", "(Landroid/bluetooth/BluetoothDevice;)I", "")>]
[<Android.Runtime.RequiresPermission("android.permission.BLUETOOTH_CONNECT")>]
abstract member GetConnectionState : Android.Bluetooth.BluetoothDevice -> Android.Bluetooth.ProfileState
override this.GetConnectionState : Android.Bluetooth.BluetoothDevice -> Android.Bluetooth.ProfileState

參數

device
BluetoothDevice

遠端藍牙裝置。

傳回

檔案連線的狀態。 其中#STATE_CONNECTED一個、#STATE_CONNECTING、, #STATE_DISCONNECTED#STATE_DISCONNECTING

實作

屬性

備註

取得該設定檔目前的連線狀態。

這並非特定於任何應用程式設定,而是代表本地藍牙介面卡與遠端裝置的連線狀態。 這可以被像狀態欄這類只想知道本地介面卡狀態的應用程式使用。

Java 文件 android.bluetooth.BluetoothHealth.getConnectionState(android.bluetooth.BluetoothDevice)。

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

適用於