Dil

DnsOptions.StaleDnsOptions.Builder.SetAllowCrossNetworkUsage Method

Definition

Sets whether to return results originating from other networks or not.

[Android.Runtime.Register("setAllowCrossNetworkUsage", "(I)Landroid/net/http/DnsOptions$StaleDnsOptions$Builder;", "", ApiSince=34)]
public Android.Net.Http.DnsOptions.StaleDnsOptions.Builder SetAllowCrossNetworkUsage(Android.Net.Http.DnsOption state);
[<Android.Runtime.Register("setAllowCrossNetworkUsage", "(I)Landroid/net/http/DnsOptions$StaleDnsOptions$Builder;", "", ApiSince=34)>]
member this.SetAllowCrossNetworkUsage : Android.Net.Http.DnsOption -> Android.Net.Http.DnsOptions.StaleDnsOptions.Builder

Parameters

state
DnsOption

one of the DNS_OPTION_* values. Value is one of the following: DnsOptions.DNS_OPTION_UNSPECIFIED; DnsOptions.DNS_OPTION_ENABLED; DnsOptions.DNS_OPTION_DISABLED

Returns

the builder for chaining. This value cannot be null.

Attributes

Remarks

Sets whether to return results originating from other networks or not. Normally, the HTTP stack clears the DNS cache entirely when switching connections, e.g. between two Wi-Fi networks or from Wi-Fi to 4G.

Android reference for android.net.http.DnsOptions.StaleDnsOptions.Builder.setAllowCrossNetworkUsage.

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