Compartir a través de


NetworkCapabilities.NetCapabilityLocalNetwork Field

Definition

Caution

This constant will be removed in the future version. Use Android.Net.NetCapability enum directly instead of this field.

Indicates that this network is a local network.

[Android.Runtime.Register("NET_CAPABILITY_LOCAL_NETWORK", ApiSince=35)]
[System.Obsolete("This constant will be removed in the future version. Use Android.Net.NetCapability enum directly instead of this field.", true)]
public const Android.Net.NetCapability NetCapabilityLocalNetwork = 36;
[<Android.Runtime.Register("NET_CAPABILITY_LOCAL_NETWORK", ApiSince=35)>]
[<System.Obsolete("This constant will be removed in the future version. Use Android.Net.NetCapability enum directly instead of this field.", true)>]
val mutable NetCapabilityLocalNetwork : Android.Net.NetCapability

Field Value

Value = 36

Implements

Attributes

Remarks

Indicates that this network is a local network.

Local networks are networks where the device is not obtaining IP addresses from the network, but advertising IP addresses itself. Examples of local networks are: <ul> <li>USB tethering or Wi-Fi hotspot networks to which the device is sharing its Internet connectivity. <li>Thread networks where the current device is the Thread Border Router. <li>Wi-Fi P2P networks where the current device is the Group Owner. </ul>

Networks used to obtain Internet access are never local networks.

Apps that target an SDK before Build.VERSION_CODES.VANILLA_ICE_CREAM will not see networks with this capability unless they explicitly set the NET_CAPABILITY_LOCAL_NETWORK in their NetworkRequests.

Java documentation for android.net.NetworkCapabilities.NET_CAPABILITY_LOCAL_NETWORK.

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