語言

SubscribeConfig.Builder.SetInstantCommunicationModeEnabled 方法

定義

設定是否啟用並使用即時通訊來進行此訂閱會話。

[Android.Runtime.Register("setInstantCommunicationModeEnabled", "(ZI)Landroid/net/wifi/aware/SubscribeConfig$Builder;", "", ApiSince=33)]
public Android.Net.Wifi.Aware.SubscribeConfig.Builder SetInstantCommunicationModeEnabled(bool enabled, int band);
[<Android.Runtime.Register("setInstantCommunicationModeEnabled", "(ZI)Landroid/net/wifi/aware/SubscribeConfig$Builder;", "", ApiSince=33)>]
member this.SetInstantCommunicationModeEnabled : bool * int -> Android.Net.Wifi.Aware.SubscribeConfig.Builder

參數

enabled
Boolean

啟用即時通訊模式為 true,預設為 false。

band
Int32

設定為 ScanResult.WIFI_BAND_5_GHZ 時,裝置會嘗試啟用 5GHz 的即時通訊模式,但因法規要求可能會回落至 2.4Ghz。 價值屬於以下之一:ScanResult.WIFI_BAND_24_GHZ;ScanResult.WIFI_BAND_5_GHZ

傳回

目前的 Builder 建置器,使建構方法能夠串連起來。 這個值不可能為零值。

屬性

備註

設定是否啟用並使用即時通訊來進行此訂閱會話。 即時通訊將加速服務發現及此會話中建立的資料路徑。 使用 Characteristics.isInstantCommunicationModeSupported() 來檢查裝置是否支援此功能。

注意:由於此模式的耗電量增加,從發現會話開始起,它只會持續啟用 30 秒。

Android 參考資料。android.net.wifi.aware.SubscribeConfig.Builder.setInstantCommunicationModeEnabled

此頁面的部分是根據 Android 開放原始碼專案所建立和共用的工作進行修改,並根據 Creative Commons 2.5 屬性授權中所述的詞彙使用。

適用於