语言

BluetoothAdapter.GetProfileProxy 方法

定义

获取与配置文件关联的配置文件代理对象。

[Android.Runtime.Register("getProfileProxy", "(Landroid/content/Context;Landroid/bluetooth/BluetoothProfile$ServiceListener;I)Z", "")]
public bool GetProfileProxy(Android.Content.Context? context, Android.Bluetooth.IBluetoothProfileServiceListener? listener, Android.Bluetooth.ProfileType profile);
[<Android.Runtime.Register("getProfileProxy", "(Landroid/content/Context;Landroid/bluetooth/BluetoothProfile$ServiceListener;I)Z", "")>]
member this.GetProfileProxy : Android.Content.Context * Android.Bluetooth.IBluetoothProfileServiceListener * Android.Bluetooth.ProfileType -> bool

参数

context
Context

应用程序的上下文

listener
IBluetoothProfileServiceListener

连接回调的服务侦听器。

profile
ProfileType

蓝牙配置文件; BluetoothProfile#HEADSET、 BluetoothProfile#A2DP、 BluetoothProfile#GATT或 BluetoothProfile#HEARING_AIDBluetoothProfile#GATT_SERVER。

返回

成功时为 true,错误时为 false

特性

注解

Java文档android.bluetooth.BluetoothAdapter.getProfileProxy(android.content.Context, android.bluetooth.ServiceListener, int)。

本页的某些部分是根据 创建和共享的工作进行的修改,并根据 许可证中所述的条款使用。

适用于