Added in API level 1
Deprecated in API level 29

State


class State
kotlin.Any
   ↳ kotlin.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 DISCONNECTED
CONNECTING CONNECTING
AUTHENTICATING CONNECTING
OBTAINING_IPADDR CONNECTING
VERIFYING_POOR_LINK CONNECTING
CAPTIVE_PORTAL_CHECK CONNECTING
CONNECTED CONNECTED
SUSPENDED SUSPENDED
DISCONNECTING DISCONNECTING
DISCONNECTED DISCONNECTED
FAILED DISCONNECTED
BLOCKED DISCONNECTED

Summary

Enum values

Enum values

CONNECTED

Added in API level 1
enum val CONNECTED : NetworkInfo.State

Deprecated: Deprecated in Java.

CONNECTING

Added in API level 1
enum val CONNECTING : NetworkInfo.State

Deprecated: Deprecated in Java.

DISCONNECTED

Added in API level 1
enum val DISCONNECTED : NetworkInfo.State

Deprecated: Deprecated in Java.

DISCONNECTING

Added in API level 1
enum val DISCONNECTING : NetworkInfo.State

Deprecated: Deprecated in Java.

SUSPENDED

Added in API level 1
enum val SUSPENDED : NetworkInfo.State

Deprecated: Deprecated in Java.

UNKNOWN

Added in API level 1
enum val UNKNOWN : NetworkInfo.State

Deprecated: Deprecated in Java.