語言

BluetoothGattConnectionSettings.Builder.SetOpportunisticEnabled 方法

定義

判斷該 GATT 用戶端是否屬於機會主義。

[Android.Runtime.Register("setOpportunisticEnabled", "(Z)Landroid/bluetooth/BluetoothGattConnectionSettings$Builder;", "", ApiSince=37)]
public Android.Bluetooth.BluetoothGattConnectionSettings.Builder SetOpportunisticEnabled(bool opportunisticEnabled);
[<Android.Runtime.Register("setOpportunisticEnabled", "(Z)Landroid/bluetooth/BluetoothGattConnectionSettings$Builder;", "", ApiSince=37)>]
member this.SetOpportunisticEnabled : bool -> Android.Bluetooth.BluetoothGattConnectionSettings.Builder

參數

opportunisticEnabled
Boolean

如果這個連結是機會主義的,則為假。

傳回

這個建築商。 這個值不可能為零值。

屬性

備註

判斷該 GATT 用戶端是否屬於機會主義。 機會主義的 GATT 用戶端不會持有 GATT 連線。 當遠端裝置沒有其他 GATT 連線啟用時,它會自動斷開

Android 參考資料。android.bluetooth.BluetoothGattConnectionSettings.Builder.setOpportunisticEnabled

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

適用於