PreferentialNetworkServiceConfig.Builder.SetShouldBlockNonMatchingNetworks Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Set whether to block UIDs from using other networks than the preferential service.
[Android.Runtime.Register("setShouldBlockNonMatchingNetworks", "(Z)Landroid/app/admin/PreferentialNetworkServiceConfig$Builder;", "", ApiSince=34)]
public Android.App.Admin.PreferentialNetworkServiceConfig.Builder SetShouldBlockNonMatchingNetworks(bool blockNonMatchingNetworks);
[<Android.Runtime.Register("setShouldBlockNonMatchingNetworks", "(Z)Landroid/app/admin/PreferentialNetworkServiceConfig$Builder;", "", ApiSince=34)>]
member this.SetShouldBlockNonMatchingNetworks : bool -> Android.App.Admin.PreferentialNetworkServiceConfig.Builder
Parameters
- blockNonMatchingNetworks
- Boolean
true if UIDs should be blocked from using non-matching networks.
Returns
The builder to facilitate chaining. This value cannot be null.
- Attributes
Remarks
Set whether to block UIDs from using other networks than the preferential service.
Apps can inspect the list of available networks on the device and choose to use multiple of them concurrently for performance, privacy or other reasons. This boolean configures whether the concerned UIDs should be blocked from using networks that do not match the configured preferential network service even if these networks are otherwise open to all apps.
The default value is false. This value can only be set to true if setFallbackToDefaultConnectionAllowed(boolean) is set to false, because allowing fallback but blocking it does not make sense. Failure to comply with this constraint will throw when building the object.
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.