Language

WifiNetworkSuggestion.Builder.SetUntrusted(Boolean) Method

Definition

Specifies whether the system will bring up the network (if selected) as untrusted.

[Android.Runtime.Register("setUntrusted", "(Z)Landroid/net/wifi/WifiNetworkSuggestion$Builder;", "", ApiSince=30)]
public Android.Net.Wifi.WifiNetworkSuggestion.Builder SetUntrusted(bool isUntrusted);
[<Android.Runtime.Register("setUntrusted", "(Z)Landroid/net/wifi/WifiNetworkSuggestion$Builder;", "", ApiSince=30)>]
member this.SetUntrusted : bool -> Android.Net.Wifi.WifiNetworkSuggestion.Builder

Parameters

isUntrusted
Boolean

Boolean indicating whether the network should be brought up untrusted (if true) or trusted (if false).

Returns

Instance of Builder to enable chaining of the builder method. This value cannot be null.

Attributes

Remarks

Specifies whether the system will bring up the network (if selected) as untrusted. An untrusted network has its NetworkCapabilities.NET_CAPABILITY_TRUSTED capability removed. The Wi-Fi network selection process may use this information to influence priority of the suggested network for Wi-Fi network selection (most likely to reduce it). The connectivity service may use this information to influence the overall network configuration of the device.

These suggestions are only considered for network selection if a NetworkRequest without NetworkCapabilities.NET_CAPABILITY_TRUSTED capability is filed; An untrusted network's credentials may not be shared with the user using setCredentialSharedWithUser(boolean); If not set, defaults to false (i.e. network is trusted).

Android reference for android.net.wifi.WifiNetworkSuggestion.Builder.setUntrusted.

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