语言

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)。

本页的某些部分是根据 创建和共享的工作进行的修改,并根据 许可证中所述的条款使用。

适用于