Language

BluetoothHearingAid.GetConnectionState(BluetoothDevice) メソッド

定義

プロファイルの現在の接続状態を取得します。 S以上を対象とするアプリの場合は、RequestPermissions(String[], Int32)で取得できるBluetoothConnectアクセス許可が必要です。

[Android.Runtime.Register("getConnectionState", "(Landroid/bluetooth/BluetoothDevice;)I", "", ApiSince=29)]
[Android.Runtime.RequiresPermission("android.permission.BLUETOOTH_CONNECT")]
public Android.Bluetooth.ProfileState GetConnectionState(Android.Bluetooth.BluetoothDevice device);
[<Android.Runtime.Register("getConnectionState", "(Landroid/bluetooth/BluetoothDevice;)I", "", ApiSince=29)>]
[<Android.Runtime.RequiresPermission("android.permission.BLUETOOTH_CONNECT")>]
abstract member GetConnectionState : Android.Bluetooth.BluetoothDevice -> Android.Bluetooth.ProfileState
override this.GetConnectionState : Android.Bluetooth.BluetoothDevice -> Android.Bluetooth.ProfileState

パラメーター

device
BluetoothDevice

このプロファイルを介した接続が照会されるリモート デバイス。

戻り値

値は、 Disconnected; Connecting; Connectedのいずれかです。 Disconnecting

実装

属性

注釈

プロファイルの現在の接続状態を取得します。 S以上を対象とするアプリの場合は、RequestPermissions(String[], Int32)で取得できるBluetoothConnectアクセス許可が必要です。 BluetoothConnect が必要です。

Javaドキュメント。

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

適用対象