Sdílet prostřednictvím


BluetoothAdapter.GetProfileProxy Method

Definition

Get the profile proxy object associated with the profile.

[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

Parameters

context
Context

Context of the application

listener
IBluetoothProfileServiceListener

The service Listener for connection callbacks.

profile
ProfileType

The Bluetooth profile; either BluetoothProfile#HEADSET, BluetoothProfile#A2DP, BluetoothProfile#GATT, BluetoothProfile#HEARING_AID or BluetoothProfile#GATT_SERVER.

Returns

true on success, false on error

Attributes

Remarks

Java documentation for android.bluetooth.BluetoothAdapter.getProfileProxy(android.content.Context, android.bluetooth.ServiceListener, int).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to