BluetoothManager.GetDevicesMatchingConnectionStates 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
获取与任何给定连接状态匹配的设备列表。
[Android.Runtime.Register("getDevicesMatchingConnectionStates", "(I[I)Ljava/util/List;", "")]
[Android.Runtime.RequiresPermission("android.permission.BLUETOOTH_CONNECT")]
public System.Collections.Generic.IList<Android.Bluetooth.BluetoothDevice>? GetDevicesMatchingConnectionStates(Android.Bluetooth.ProfileType profile, int[]? states);
[<Android.Runtime.Register("getDevicesMatchingConnectionStates", "(I[I)Ljava/util/List;", "")>]
[<Android.Runtime.RequiresPermission("android.permission.BLUETOOTH_CONNECT")>]
member this.GetDevicesMatchingConnectionStates : Android.Bluetooth.ProfileType * int[] -> System.Collections.Generic.IList<Android.Bluetooth.BluetoothDevice>
参数
- profile
- ProfileType
GATT 或 GATT_SERVER
- states
- Int32[]
状态数组。 状态可以是其中一个BluetoothProfile#STATE_CONNECTED、、BluetoothProfile#STATE_CONNECTING、BluetoothProfile#STATE_DISCONNECTED、 BluetoothProfile#STATE_DISCONNECTING
返回
设备列表。 该列表在错误时将为空。
- 特性
注解
获取与任何给定连接状态匹配的设备列表。
如果任何设备都与任何给定状态都不匹配,将返回空列表。
这并非特定于任何应用程序配置,而是表示此配置文件的本地蓝牙适配器的连接状态。 这可由状态栏等应用程序使用,这些状态栏只希望知道本地适配器的状态。
Java文档android.bluetooth.BluetoothManager.getDevicesMatchingConnectionStates(int, int[])。
本页的某些部分是根据 创建和共享的工作进行的修改,并根据 许可证中所述的条款使用。