Language

BluetoothManager.GetDevicesMatchingConnectionStates メソッド

定義

特定の接続状態のいずれかに一致するデバイスの一覧を取得します。

[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、

返品

デバイスの一覧。 エラーが発生すると、リストは空になります。

属性

注釈

特定の接続状態のいずれかに一致するデバイスの一覧を取得します。

どのデバイスも特定の状態と一致しない場合は、空のリストが返されます。

これは、どのアプリケーション構成にも固有ではありませんが、このプロファイルのローカル Bluetooth アダプターの接続状態を表します。 これは、ローカル アダプターの状態を知りたいステータス バーなどのアプリケーションで使用できます。

Javaドキュメント。

このページの一部は、によって作成および共有され、に記載されている条件に従って使用される作業に基づく変更です。

適用対象