Please note that the contents of this offline web site may be out of date. To access the most recent documentation visit the online version .
Note that links that point to online resources are green in color and will open in a new window.
We would love it if you could give us feedback about this material by filling this form (You have to be online to fill it)
Android APIs
Added in API level 1
package

android.net

Classes that help with network access, beyond the normal java.net.* APIs.

Interfaces

UrlQuerySanitizer.ValueSanitizer A functor used to sanitize a single query value. 

Classes

ConnectivityManager Class that answers queries about the state of network connectivity. 
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. 
LocalServerSocket non-standard class for creating inbound UNIX-domain socket on the Android platform, this is created in the Linux non-filesystem namespace. 
LocalSocket Creates a (non-server) socket in the UNIX-domain namespace. 
LocalSocketAddress A UNIX-domain (AF_LOCAL) socket address. 
MailTo MailTo URL parser This class parses a mailto scheme URL and then can be queried for the parsed parameters. 
NetworkInfo Describes the status of a network interface. 
Proxy A convenience class for accessing the user and default proxy settings. 
SSLCertificateSocketFactory SSLSocketFactory implementation with several extra features:
  • Timeout specification for SSL handshake operations
  • Hostname verification in most cases (see WARNINGs below)
  • Optional SSL session caching with SSLSessionCache
  • Optionally bypass all SSL certificate checks
The handshake timeout does not apply to actual TCP socket connection. 
SSLSessionCache File-based cache of established SSL sessions. 
TrafficStats Class that provides network traffic statistics. 
Uri Immutable URI reference. 
Uri.Builder Helper class for building or manipulating URI references. 
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. 
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. 

Enums

LocalSocketAddress.Namespace The namespace that this address exists in. 
NetworkInfo.DetailedState The fine-grained state of a network connection. 
NetworkInfo.State Coarse-grained network state. 

Exceptions

ParseException Thrown when parsing a URL fails.