Language

BluetoothHeadset.GetCodecType(BluetoothDevice) メソッド

定義

指定された HFP 接続デバイスのコーデックの種類を取得します。

[Android.Runtime.Register("getCodecType", "(Landroid/bluetooth/BluetoothDevice;)I", "", ApiSince=37)]
[Android.Runtime.RequiresPermission("android.permission.BLUETOOTH_CONNECT")]
public Android.Bluetooth.BluetoothHeadsetCodecType GetCodecType(Android.Bluetooth.BluetoothDevice device);
[<Android.Runtime.Register("getCodecType", "(Landroid/bluetooth/BluetoothDevice;)I", "", ApiSince=37)>]
[<Android.Runtime.RequiresPermission("android.permission.BLUETOOTH_CONNECT")>]
member this.GetCodecType : Android.Bluetooth.BluetoothDevice -> Android.Bluetooth.BluetoothHeadsetCodecType

パラメーター

device
BluetoothDevice

リモート Bluetooth デバイス。 null にすることはできません。

戻り値

指定された HFP 接続デバイスのコーデックの種類。 Bluetoothがオフ、プロファイルが接続されていない、デバイスが接続されていない、コーデック ネゴシエーションが完了していない、またはエラーが発生した場合に Unsupported を返します。

属性

注釈

指定された HFP 接続デバイスのコーデックの種類を取得します。

このメソッドは、HFP SLC が確立され、コーデック ネゴシエーション プロセスが完了すると使用可能な AG と HF の間でネゴシエートされたコーデックの種類を返します。 ネゴシエートされたコーデックは、SCO オーディオ接続が現在アクティブかどうかに関係なく取得できます。 S以上を対象とするアプリの場合は、RequestPermissions(String[], Int32)で取得できるBluetoothConnectアクセス許可が必要です。 BluetoothConnect が必要です。

android.bluetooth.BluetoothHeadset.getCodecTypeの Android リファレンス。

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

適用対象