語言

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

服務 Listener 用於連線回撥。

profile
ProfileType

藍牙設定檔;要麼BluetoothProfile#HEADSET是 , BluetoothProfile#A2DP, BluetoothProfile#GATT, BluetoothProfile#GATT_SERVERBluetoothProfile#HEARING_AID 。

傳回

成功時為真,錯誤時為假

屬性

備註

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

本頁部分內容為基於 Open Source Project 所創建與分享的作品,並依授權條款所描述的使用進行修改。

適用於