Language

PreferentialNetworkServiceConfig.Builder.SetFallbackToDefaultConnectionAllowed Method

Definition

Set whether fallback to the device-wide default network is allowed.

[Android.Runtime.Register("setFallbackToDefaultConnectionAllowed", "(Z)Landroid/app/admin/PreferentialNetworkServiceConfig$Builder;", "", ApiSince=33)]
public Android.App.Admin.PreferentialNetworkServiceConfig.Builder SetFallbackToDefaultConnectionAllowed(bool allowFallbackToDefaultConnection);
[<Android.Runtime.Register("setFallbackToDefaultConnectionAllowed", "(Z)Landroid/app/admin/PreferentialNetworkServiceConfig$Builder;", "", ApiSince=33)>]
member this.SetFallbackToDefaultConnectionAllowed : bool -> Android.App.Admin.PreferentialNetworkServiceConfig.Builder

Parameters

allowFallbackToDefaultConnection
Boolean

true if fallback is allowed else false

Returns

The builder to facilitate chaining. This value cannot be null.

Attributes

Remarks

Set whether fallback to the device-wide default network is allowed.

This boolean configures whether the default connection (e.g. general cell network or wifi) should be used if no preferential network service connection is available. If true, the default connection will be used when no preferential service is available. If false, the UIDs subject to this configuration will have no default network. Note that while this boolean determines whether the UIDs subject to this configuration have a default network in the absence of a preferential service, apps can still explicitly decide to use another network than their default network by requesting them from the system. This boolean does not determine whether the UIDs are blocked from using such other networks. Use setShouldBlockNonMatchingNetworks(boolean) to specify this.

The default value is true.

Android reference for android.app.admin.PreferentialNetworkServiceConfig.Builder.setFallbackToDefaultConnectionAllowed.

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