Language

NetCapability Enum

Definition

Defines values used by the Android NetCapability API.

public enum NetCapability
type NetCapability = 
Inheritance
NetCapability

Fields

Name Value Description
Mms 0

Indicates this is a network that has the ability to reach the carrier's MMSC for sending and receiving MMS messages.

Android reference for android.net.NetworkCapabilities.NET_CAPABILITY_MMS.

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.

Supl 1

Indicates this is a network that has the ability to reach the carrier's SUPL server, used to retrieve GPS information.

Android reference for android.net.NetworkCapabilities.NET_CAPABILITY_SUPL.

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.

Dun 2

Indicates this is a network that has the ability to reach the carrier's DUN or tethering gateway.

Android reference for android.net.NetworkCapabilities.NET_CAPABILITY_DUN.

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.

Fota 3

Indicates this is a network that has the ability to reach the carrier's FOTA portal, used for over the air updates.

Android reference for android.net.NetworkCapabilities.NET_CAPABILITY_FOTA.

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.

Ims 4

Indicates this is a network that has the ability to reach the carrier's IMS servers, used for network registration and signaling.

Android reference for android.net.NetworkCapabilities.NET_CAPABILITY_IMS.

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.

Cbs 5

Indicates this is a network that has the ability to reach the carrier's CBS servers, used for carrier specific services.

Android reference for android.net.NetworkCapabilities.NET_CAPABILITY_CBS.

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.

WifiP2p 6

Indicates this is a network that has the ability to reach a Wi-Fi direct peer.

Android reference for android.net.NetworkCapabilities.NET_CAPABILITY_WIFI_P2P.

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.

Ia 7

Indicates this is a network that has the ability to reach a carrier's Initial Attach servers.

Android reference for android.net.NetworkCapabilities.NET_CAPABILITY_IA.

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.

Rcs 8

Indicates this is a network that has the ability to reach a carrier's RCS servers, used for Rich Communication Services.

Android reference for android.net.NetworkCapabilities.NET_CAPABILITY_RCS.

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.

Xcap 9

Indicates this is a network that has the ability to reach a carrier's XCAP servers, used for configuration and control.

Android reference for android.net.NetworkCapabilities.NET_CAPABILITY_XCAP.

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.

Eims 10

Indicates this is a network that has the ability to reach a carrier's Emergency IMS servers or other services, used for network signaling during emergency calls.

Android reference for android.net.NetworkCapabilities.NET_CAPABILITY_EIMS.

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.

NotMetered 11

Indicates that this network is unmetered.

Android reference for android.net.NetworkCapabilities.NET_CAPABILITY_NOT_METERED.

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.

Internet 12

Indicates that this network should be able to reach the internet.

Android reference for android.net.NetworkCapabilities.NET_CAPABILITY_INTERNET.

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.

NotRestricted 13

Indicates that this network is available for general use. If this is not set applications should not attempt to communicate on this network. Note that this is simply informative and not enforcement - enforcement is handled via other means. Set by default.

Android reference for android.net.NetworkCapabilities.NET_CAPABILITY_NOT_RESTRICTED.

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.

Trusted 14

Indicates that the user has indicated implicit trust of this network. This generally means it's a sim-selected carrier, a plugged in ethernet, a paired BT device or a wifi the user asked to connect to. Untrusted networks are probably limited to unknown wifi AP. Set by default.

Android reference for android.net.NetworkCapabilities.NET_CAPABILITY_TRUSTED.

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.

NotVpn 15

Indicates that this network is not a VPN. This capability is set by default and should be explicitly cleared for VPN networks.

Android reference for android.net.NetworkCapabilities.NET_CAPABILITY_NOT_VPN.

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.

Validated 16

Indicates that connectivity on this network was successfully validated. For example, for a network with NET_CAPABILITY_INTERNET, it means that Internet connectivity was successfully detected.

Android reference for android.net.NetworkCapabilities.NET_CAPABILITY_VALIDATED.

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.

CaptivePortal 17

Indicates that this network was found to have a captive portal in place last time it was probed.

Android reference for android.net.NetworkCapabilities.NET_CAPABILITY_CAPTIVE_PORTAL.

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.

NotRoaming 18

Indicates that this network is not roaming.

Android reference for android.net.NetworkCapabilities.NET_CAPABILITY_NOT_ROAMING.

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.

Foreground 19

Indicates that this network is available for use by apps, and not a network that is being kept up in the background to facilitate fast network switching.

Android reference for android.net.NetworkCapabilities.NET_CAPABILITY_FOREGROUND.

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.

NotCongested 20

Indicates that this network is not congested.

When a network is congested, applications should defer network traffic that can be done at a later time, such as uploading analytics.

Android reference for android.net.NetworkCapabilities.NET_CAPABILITY_NOT_CONGESTED.

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.

NotSuspended 21

Indicates that this network is not currently suspended.

When a network is suspended, the network's IP addresses and any connections established on the network remain valid, but the network is temporarily unable to transfer data. This can happen, for example, if a cellular network experiences a temporary loss of signal, such as when driving through a tunnel, etc. A network with this capability is not suspended, so is expected to be able to transfer data.

Android reference for android.net.NetworkCapabilities.NET_CAPABILITY_NOT_SUSPENDED.

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.

Mcx 23

Indicates this is a network that has the ability to reach a carrier's Mission Critical servers.

Android reference for android.net.NetworkCapabilities.NET_CAPABILITY_MCX.

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.

TemporarilyNotMetered 25

Indicates that this network is temporarily unmetered.

This capability will be set for networks that are generally metered, but are currently unmetered, e.g., because the user is in a particular area. This capability can be changed at any time. When it is removed, applications are responsible for stopping any data transfer that should not occur on a metered network. Note that most apps should use NET_CAPABILITY_NOT_METERED instead. For more information, see https://developer.android.com/about/versions/11/features/5g#meteredness.

Android reference for android.net.NetworkCapabilities.NET_CAPABILITY_TEMPORARILY_NOT_METERED.

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.

Enterprise 29

Indicates that this network is intended for enterprise use.

5G URSP rules may indicate that all data should use a connection dedicated for enterprise use. If the enterprise capability is requested, all enterprise traffic will be routed over the connection with this capability.

Android reference for android.net.NetworkCapabilities.NET_CAPABILITY_ENTERPRISE.

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.

HeadUnit 32

Indicates that this network is connected to an automotive head unit.

Android reference for android.net.NetworkCapabilities.NET_CAPABILITY_HEAD_UNIT.

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.

Mmtel 33

Indicates that this network has ability to support MMTEL (Multimedia Telephony service).

Android reference for android.net.NetworkCapabilities.NET_CAPABILITY_MMTEL.

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.

PrioritizeLatency 34

Indicates that this network should be able to prioritize latency for the internet. Apps targeting Build.VERSION_CODES.UPSIDE_DOWN_CAKE or higher, requesting this capability with ConnectivityManager.requestNetwork requires declaration in the self-certified network capabilities. See NetworkRequest for the self-certification documentation.

Android reference for android.net.NetworkCapabilities.NET_CAPABILITY_PRIORITIZE_LATENCY.

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.

PrioritizeBandwidth 35

Indicates that this network should be able to prioritize bandwidth for the internet. Apps targeting Build.VERSION_CODES.UPSIDE_DOWN_CAKE or higher, requesting this capability with ConnectivityManager.requestNetwork requires declaration in the self-certified network capabilities. See NetworkRequest for the self-certification documentation.

Android reference for android.net.NetworkCapabilities.NET_CAPABILITY_PRIORITIZE_BANDWIDTH.

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.

LocalNetwork 36

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: USB tethering or Wi-Fi hotspot networks to which the device is sharing its Internet connectivity; Thread networks where the current device is the Thread Border Router; Wi-Fi P2P networks where the current device is the Group Owner. 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.

Android reference 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.

NotBandwidthConstrained 37

Indicates that this is not a bandwidth-constrained network. Starting from Build.VERSION_CODES.VANILLA_ICE_CREAM, this capability is by default set in NetworkRequests and true for most networks. If a network lacks this capability, it is bandwidth-constrained. Bandwidth constrained networks cannot support high-bandwidth data transfers and applications that request and use them must ensure that they limit bandwidth usage to below the values returned by getLinkDownstreamBandwidthKbps() and getLinkUpstreamBandwidthKbps() and limit the frequency of their network usage. If applications perform high-bandwidth data transfers on constrained networks or perform network access too frequently, the system may block the app's access to the network. The system may take other measures to reduce network usage on constrained networks, such as disabling network access to apps that are not in the foreground.

Android reference for android.net.NetworkCapabilities.NET_CAPABILITY_NOT_BANDWIDTH_CONSTRAINED.

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.

PrioritizeUnifiedCommunications 38

Indicates that this network is optimized for real-time unified communications, such as Over-the-Top (OTT) voice and video calls.

This capability is intended specifically for applications that handle Over-the-Top (OTT) voice and video calls. It is not intended for non ott applications.

This capability signals to the system that the network may offer a dedicated slice for high-priority, low-latency data paths. It can be used in two ways: The system can request a network with this capability on behalf of an eligible application when it detects an active OTT call to improve Quality of Service (QoS); An ott application can request a network with this capability directly using ConnectivityManager.requestNetwork(NetworkRequest, PendingIntent).

This capability is a hint from the network and does not guarantee that it will be used for any given call. Apps targeting Build.VERSION_CODES.UPSIDE_DOWN_CAKE or higher, requesting this capability with ConnectivityManager.requestNetwork requires declaration in the self-certified network capabilities. See NetworkRequest for the self-certification documentation.

Android reference for android.net.NetworkCapabilities.NET_CAPABILITY_PRIORITIZE_UNIFIED_COMMUNICATIONS.

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.

Remarks

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