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 |
This enum was deprecated
in API level 29.
See NetworkInfo
.
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 | |
---|---|
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
Public methods
valueOf
public static NetworkInfo.State valueOf (String name)
Parameters | |
---|---|
name |
String |
Returns | |
---|---|
NetworkInfo.State |
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2024-06-18 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-06-18 UTC."],[],[]]