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

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

Javaドキュメント。

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

適用対象