Language

SubscribeConfig.Builder.SetInstantCommunicationModeEnabled Method

Definition

Configure whether to enable and use instant communication for this subscribe session.

[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

Parameters

enabled
Boolean

true for enable instant communication mode, default is false.

band
Int32

The integer value of Band24Ghz or Band5Ghz. If 5 GHz is selected, the device may fall back to 2.4 GHz due to regulatory requirements.

Returns

the current Builder builder, enabling chaining of builder methods. This value cannot be null.

Attributes

Remarks

Configure whether to enable and use instant communication for this subscribe session. Instant communication will speed up service discovery and any data-path set up as part of this session. Use IsInstantCommunicationModeSupported to check if the device supports this feature.

Because instant mode uses more power, a session's request is time-limited (30 seconds by default). Updating a session can restart the limit. Other sessions can also keep instant mode enabled.

Android reference for android.net.wifi.aware.SubscribeConfig.Builder.setInstantCommunicationModeEnabled.

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