BluetoothAdapter.GetProfileConnectionState(ProfileType) 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
取得設定檔目前的連線狀態。
[Android.Runtime.Register("getProfileConnectionState", "(I)I", "")]
[Android.Runtime.RequiresPermission("android.permission.BLUETOOTH_CONNECT")]
public Android.Bluetooth.ProfileState GetProfileConnectionState(Android.Bluetooth.ProfileType profile);
[<Android.Runtime.Register("getProfileConnectionState", "(I)I", "")>]
[<Android.Runtime.RequiresPermission("android.permission.BLUETOOTH_CONNECT")>]
member this.GetProfileConnectionState : Android.Bluetooth.ProfileType -> Android.Bluetooth.ProfileState
參數
- profile
- ProfileType
傳回
價值屬於以下之一:STATE_DISCONNECTED;STATE_CONNECTING;STATE_CONNECTED;STATE_DISCONNECTING
- 屬性
備註
取得設定檔目前的連線狀態。 此功能可用來檢查本地藍牙轉接器是否連接到特定設定檔的遠端裝置。 剖面可以是其中之一BluetoothProfile#HEADSET。 BluetoothProfile#A2DP
回傳設定檔連線狀態
Android 參考資料。android.bluetooth.BluetoothAdapter.getProfileConnectionState
本頁部分內容為基於 Open Source Project 所創建與分享的作品,並依授權條款所描述的使用進行修改。