Most visited

Recently visited

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 state Coarse-grained state
IDLE DISCONNECTED
SCANNING CONNECTING
CONNECTING CONNECTING
AUTHENTICATING CONNECTING
CONNECTED CONNECTED
DISCONNECTING DISCONNECTING
DISCONNECTED DISCONNECTED
UNAVAILABLE DISCONNECTED
FAILED DISCONNECTED

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

From class java.lang.Enum
From class java.lang.Object
From interface java.lang.Comparable

Enum values

CONNECTED

Added in API level 1
NetworkInfo.State CONNECTED

CONNECTING

Added in API level 1
NetworkInfo.State CONNECTING

DISCONNECTED

Added in API level 1
NetworkInfo.State DISCONNECTED

DISCONNECTING

Added in API level 1
NetworkInfo.State DISCONNECTING

SUSPENDED

Added in API level 1
NetworkInfo.State SUSPENDED

UNKNOWN

Added in API level 1
NetworkInfo.State UNKNOWN

Public methods

valueOf

Added in API level 1
NetworkInfo.State valueOf (String name)

Parameters
name String
Returns
NetworkInfo.State

values

Added in API level 1
State[] values ()

Returns
State[]