Android.Net Namespace

Provides APIs for managing Android network connectivity, addressing, sockets, and related networking features.

Classes

Name Description
CaptivePortal

A class allowing apps handling the ConnectivityManager#ACTION_CAPTIVE_PORTAL_SIGN_IN activity to indicate to the system different outcomes of captive portal sign in.

CaptivePortal.InterfaceConsts

Provides constants inherited from the Android CaptivePortal type.

ConnectivityDiagnosticsManager

Class that provides utilities for collecting network connectivity diagnostics information.

ConnectivityDiagnosticsManager.ConnectivityDiagnosticsCallback

Abstract base class for Connectivity Diagnostics callbacks.

ConnectivityDiagnosticsManager.ConnectivityReport

Class that includes connectivity information for a specific Network at a specific time.

ConnectivityDiagnosticsManager.ConnectivityReport.InterfaceConsts

Provides constants inherited from the Android ConnectivityDiagnosticsManager.ConnectivityReport type.

ConnectivityDiagnosticsManager.DataStallReport

Class that includes information for a suspected data stall on a specific Network

ConnectivityDiagnosticsManager.DataStallReport.InterfaceConsts

Provides constants inherited from the Android ConnectivityDiagnosticsManager.DataStallReport type.

ConnectivityManager

Class that answers queries about the state of network connectivity.

ConnectivityManager.NetworkCallback

Base class for NetworkRequest callbacks.

Credentials

A class for representing UNIX credentials passed via ancillary data on UNIX domain sockets.

DhcpInfo

A simple object for retrieving the results of a DHCP request.

DhcpInfo.InterfaceConsts

Provides constants inherited from the Android DhcpInfo type.

DnsResolver

Dns resolver class for asynchronous dns querying

DnsResolver.DnsException

Class to represent DNS error

EthernetNetworkSpecifier

A NetworkSpecifier used to identify ethernet interfaces.

EthernetNetworkSpecifier.InterfaceConsts

Provides constants inherited from the Android EthernetNetworkSpecifier type.

Ikev2VpnProfile

The Ikev2VpnProfile is a configuration for the platform setup of IKEv2/IPsec VPNs.

Ikev2VpnProfile.Builder

A incremental builder for IKEv2 VPN profiles

InetAddresses

Utility methods for InetAddress implementations.

IpConfiguration

A class representing the IP configuration of a network.

IpConfiguration.Builder

Builder used to construct IpConfiguration objects.

IpConfiguration.InterfaceConsts

Provides constants inherited from the Android IpConfiguration type.

IpPrefix

This class represents an IP prefix, i.

IpPrefix.InterfaceConsts

Provides constants inherited from the Android IpPrefix type.

IpSecAlgorithm

This class represents a single algorithm that can be used by an IpSecTransform.

IpSecAlgorithm.InterfaceConsts

Provides constants inherited from the Android IpSecAlgorithm type.

IpSecManager

This class contains methods for managing IPsec sessions.

IpSecManager.ResourceUnavailableException

Thrown to indicate that an IPsec resource is unavailable.

IpSecManager.SecurityParameterIndex

This class represents a reserved SPI.

IpSecManager.SpiUnavailableException

Thrown to indicate that a requested SPI is in use.

IpSecManager.UdpEncapsulationSocket

This class provides access to a UDP encapsulation Socket.

IpSecTransform

This class represents a transform, which roughly corresponds to an IPsec Security Association.

IpSecTransform.Builder

This class is used to build IpSecTransform objects.

IpSecTransformState

This class represents a snapshot of the state of an IpSecTransform

IpSecTransformState.Builder

Builder class for testing purposes

IpSecTransformState.InterfaceConsts

Provides constants inherited from the Android IpSecTransformState type.

L2capNetworkSpecifier

A NetworkSpecifier used to identify an L2CAP network over BLE.

L2capNetworkSpecifier.Builder

A builder class for L2capNetworkSpecifier.

L2capNetworkSpecifier.InterfaceConsts

Provides constants inherited from the Android L2capNetworkSpecifier type.

LinkAddress

Identifies an IP address on a network link.

LinkAddress.InterfaceConsts

Provides constants inherited from the Android LinkAddress type.

LinkProperties

Describes the properties of a network link.

LinkProperties.InterfaceConsts

Provides constants inherited from the Android LinkProperties type.

LocalServerSocket

Non-standard class for creating an inbound UNIX-domain socket in the Linux abstract namespace.

LocalSocket

Creates a (non-server) socket in the UNIX-domain namespace.

LocalSocketAddress

A UNIX-domain (AF_LOCAL) socket address.

LocalSocketAddress.Namespace

The namespace that this address exists in.

MacAddress

Representation of a MAC address.

MacAddress.InterfaceConsts

Provides constants inherited from the Android MacAddress type.

MailTo

MailTo URL parser

Network

Identifies a Network.

Network.InterfaceConsts

Provides constants inherited from the Android Network type.

NetworkCapabilities

Representation of the capabilities of an active network.

NetworkCapabilities.InterfaceConsts

Provides constants inherited from the Android NetworkCapabilities type.

NetworkInfo

Describes the status of a network interface.

NetworkInfo.DetailedState

The fine-grained state of a network connection.

NetworkInfo.InterfaceConsts

Provides constants inherited from the Android NetworkInfo type.

NetworkInfo.State

Coarse-grained network state.

NetworkRequest

An object describing a network that the application is interested in.

NetworkRequest.Builder

Builder used to create NetworkRequest objects.

NetworkRequest.InterfaceConsts

Provides constants inherited from the Android NetworkRequest type.

NetworkSpecifier

Describes specific properties of a requested network for use in a NetworkRequest.

ParseException

Thrown when parsing failed.

PlatformVpnProfile

PlatformVpnProfile represents a configuration for a platform-based VPN implementation.

Proxy

A convenience class for accessing the user and default proxy settings.

ProxyInfo

Describes a proxy configuration.

ProxyInfo.InterfaceConsts

Provides constants inherited from the Android ProxyInfo type.

PskKeyManager

Provider of key material for pre-shared key (PSK) key exchange used in TLS-PSK cipher suites.

RouteInfo

Represents a network route.

RouteInfo.InterfaceConsts

Provides constants inherited from the Android RouteInfo type.

SocketKeepalive

Allows applications to request that the system periodically send specific packets on their behalf, using hardware offload to save battery power.

SocketKeepalive.Callback

The callback which app can use to learn the status changes of SocketKeepalive.

SSLCertificateSocketFactory

SSLSocketFactory implementation with several extra features:

        <ul>
        <li>Timeout specification for SSL handshake operations
        <li>Hostname verification in most cases (see WARNINGs below)
        &lt;li&gt;Optional SSL session caching with <code data-dev-comment-type="c">SSLSessionCache</code>&lt;li&gt;Optionally bypass all SSL certificate checks
        &lt;/ul&gt;

        The handshake timeout does not apply to actual TCP socket connection.
SSLSessionCache

File-based cache of established SSL sessions.

StaticIpConfiguration

Class that describes static IP configuration.

StaticIpConfiguration.Builder

Helper class to build a new instance of StaticIpConfiguration.

StaticIpConfiguration.InterfaceConsts

Provides constants inherited from the Android StaticIpConfiguration type.

TelephonyNetworkSpecifier

NetworkSpecifier object for cellular network request.

TelephonyNetworkSpecifier.Builder

Builder to create TelephonyNetworkSpecifier object.

TelephonyNetworkSpecifier.InterfaceConsts

Provides constants inherited from the Android TelephonyNetworkSpecifier type.

TetheringInterface

The mapping of tethering interface and type.

TetheringInterface.InterfaceConsts

Provides constants inherited from the Android TetheringInterface type.

TetheringManager

This class provides the APIs to control the tethering service.

TetheringManager.TetheringRequest

Use with #startTethering to specify additional parameters when starting tethering.

TetheringManager.TetheringRequest.Builder

Represents the Android TetheringManager.TetheringRequest.Builder API type.

TetheringManager.TetheringRequest.InterfaceConsts

Provides constants inherited from the Android TetheringManager.TetheringRequest type.

TrafficStats

Class that provides network traffic statistics.

Uri

Immutable URI reference.

Uri.Builder

Helper class for building or manipulating URI references.

Uri.InterfaceConsts

Provides constants inherited from the Android Uri type.

UrlQuerySanitizer

Sanitizes the Query portion of a URL.

UrlQuerySanitizer.IllegalCharacterValueSanitizer

Sanitize values based on which characters they contain.

UrlQuerySanitizer.ParameterValuePair

A simple tuple that holds parameter-value pairs.

VpnManager

This class provides an interface for apps to manage platform VPN profiles

VpnProfileState

Describe the state of VPN.

VpnProfileState.InterfaceConsts

Provides constants inherited from the Android VpnProfileState type.

VpnService

VpnService is a base class for applications to extend and build their own VPN solutions.

VpnService.Builder

Helper class to create a VPN interface.

Interfaces

Name Description
ConnectivityManager.IOnNetworkActiveListener

Callback for use with ConnectivityManager#addDefaultNetworkActiveListener to find out when the system default network has gone in to a high power state.

DnsResolver.ICallback

Base interface for answer callbacks

ITransportInfo

A container for transport-specific capabilities which is returned by NetworkCapabilities#getTransportInfo().

TetheringManager.IStartTetheringCallback

Callback for use with #startTethering to find out whether tethering succeeded.

TetheringManager.IStopTetheringCallback

Callback for use with #stopTethering to find out whether stop tethering succeeded.

TetheringManager.ITetheringEventCallback

Callback for use with registerTetheringEventCallback to find out tethering upstream status.

UrlQuerySanitizer.IValueSanitizer

A functor used to sanitize a single query value.

Enums

Name Description
ConnectivityType

Enumerates values returned by several types and taken as a parameter of several methods of ConnectivityManager.

DataStallDetectionMethod

Defines values used by the Android DataStallDetectionMethod API.

DnsResolverFlag

Defines values used by the Android DnsResolverFlag API.

DnsResolverType

Defines values used by the Android DnsResolverType API.

ErrorCode

Defines values used by the Android ErrorCode API.

IllegalCharacterFlags

Enumerates values returned by several methods of IllegalCharacterFlags and taken as a parameter of the F:Android.Net.UrlQuerySanitizer+IllegalCharacterValueSanitizer..ctor member.

IpSecTransportDirection

Defines values used by the Android IpSecTransportDirection API.

L2capNetworkSpecifierHeaderCompression

Defines values used by the Android L2capNetworkSpecifierHeaderCompression API.

L2capNetworkSpecifierRole

Defines values used by the Android L2capNetworkSpecifierRole API.

MacAddressType

Defines values used by the Android MacAddressType API.

MultipathPreference

Defines values used by the Android MultipathPreference API.

NetCapability

Defines values used by the Android NetCapability API.

NetEnterpriseId

Defines values used by the Android NetEnterpriseId API.

NetworkCallbackFlags

Defines values used by the Android NetworkCallbackFlags API.

NetworkProbeType

Defines values used by the Android NetworkProbeType API.

NetworkValidationResult

Defines values used by the Android NetworkValidationResult API.

PlatformVpnProfileType

Defines values used by the Android PlatformVpnProfileType API.

RestrictBackgroundStatus

Defines values used by the Android RestrictBackgroundStatus API.

RouteType

Defines values used by the Android RouteType API.

SocketType

Enumerates values returned by several types and taken as a parameter of the F:Android.Net.LocalSocket..ctor member.

TetheringManagerConnectivityScope

Defines values used by the Android TetheringManagerConnectivityScope API.

TetheringManagerTetherError

Defines values used by the Android TetheringManagerTetherError API.

TetheringManagerTetheringType

Defines values used by the Android TetheringManagerTetheringType API.

TransportType

Defines values used by the Android TransportType API.

VpnErrorClass

Defines values used by the Android VpnErrorClass API.

VpnErrorCode

Defines values used by the Android VpnErrorCode API.

VpnState

Defines values used by the Android VpnState API.

WifiMode

Enumerates values returned by the Full, FullHighPerf, and ScanOnly members and taken as a parameter of the F:Android.Net.Wifi.WifiManager.CreateWifiLock member.

WifiState

Enumerates values returned by several types.

Remarks

Java documentation for the android.net package.