added in API level 1

NetworkInfo.State

public static final enum NetworkInfo.State
extends Enum<NetworkInfo.State>

java.lang.Object
   ↳ java.lang.Enum<android.net.NetworkInfo.State>
     ↳ android.net.NetworkInfo.State


Coarse-grained network state. This is probably what most applications should use, rather than DetailedState. The mapping between the two is as follows:

Detailed stateCoarse-grained state
IDLEDISCONNECTED
SCANNINGDISCONNECTED
CONNECTINGCONNECTING
AUTHENTICATINGCONNECTING
OBTAINING_IPADDRCONNECTING
VERIFYING_POOR_LINKCONNECTING
CAPTIVE_PORTAL_CHECKCONNECTING
CONNECTEDCONNECTED
SUSPENDEDSUSPENDED
DISCONNECTINGDISCONNECTING
DISCONNECTEDDISCONNECTED
FAILEDDISCONNECTED
BLOCKEDDISCONNECTED

Summary

Enum values

NetworkInfo.State  CONNECTED

 

NetworkInfo.State  CONNECTING

 

NetworkInfo.State  DISCONNECTED

 

NetworkInfo.State  DISCONNECTING

 

NetworkInfo.State  SUSPENDED

 

NetworkInfo.State  UNKNOWN

 

Public methods

static NetworkInfo.State valueOf(String name)
static final State[] values()

Inherited methods

Enum values

CONNECTED

added in API level 1
public static final NetworkInfo.State CONNECTED

CONNECTING

added in API level 1
public static final NetworkInfo.State CONNECTING

DISCONNECTED

added in API level 1
public static final NetworkInfo.State DISCONNECTED

DISCONNECTING

added in API level 1
public static final NetworkInfo.State DISCONNECTING

SUSPENDED

added in API level 1
public static final NetworkInfo.State SUSPENDED

UNKNOWN

added in API level 1
public static final NetworkInfo.State UNKNOWN

Public methods

valueOf

added in API level 1
public static NetworkInfo.State valueOf (String name)

Parameters
name String

Returns
NetworkInfo.State

values

added in API level 1
public static final State[] values ()

Returns
State[]