語言

BluetoothManager.GetConnectedDevices(ProfileType) 方法

定義

取得符合指定配置檔的連接裝置。

[Android.Runtime.Register("getConnectedDevices", "(I)Ljava/util/List;", "")]
[Android.Runtime.RequiresPermission("android.permission.BLUETOOTH_CONNECT")]
public System.Collections.Generic.IList<Android.Bluetooth.BluetoothDevice>? GetConnectedDevices(Android.Bluetooth.ProfileType profile);
[<Android.Runtime.Register("getConnectedDevices", "(I)Ljava/util/List;", "")>]
[<Android.Runtime.RequiresPermission("android.permission.BLUETOOTH_CONNECT")>]
member this.GetConnectedDevices : Android.Bluetooth.ProfileType -> System.Collections.Generic.IList<Android.Bluetooth.BluetoothDevice>

參數

profile
ProfileType

GATT 或 GATT_SERVER

傳回

裝置清單。 錯誤時清單會是空的。

屬性

備註

取得符合指定配置檔的連接裝置。

回傳處於狀態的裝置集合 BluetoothProfile#STATE_CONNECTED

這並非特定於任何應用程式設定,而是代表此配置檔藍牙的連線狀態。 這可以用來做像狀態列這類只想知道藍牙狀態的應用程式。

Java 文件 android.bluetooth.BluetoothManager.getConnectedDevices(int)。

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

適用於