public static final enum NetworkInfo.State
extends Enum<NetworkInfo.State>
java.lang.Object | ||
↳ | java.lang.Enum<android.net.NetworkInfo.State> | |
↳ | android.net.NetworkInfo.State |
粗粒度的网络状态。 这可能是大多数应用程序应该使用的,而不是DetailedState
。 两者之间的映射如下:
Detailed state | Coarse-grained state |
IDLE |
DISCONNECTED |
SCANNING |
CONNECTING |
CONNECTING |
CONNECTING |
AUTHENTICATING |
CONNECTING |
CONNECTED |
CONNECTED |
DISCONNECTING |
DISCONNECTING |
DISCONNECTED |
DISCONNECTED |
UNAVAILABLE |
DISCONNECTED |
FAILED |
DISCONNECTED |
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
|
NetworkInfo.State valueOf (String name)
Parameters | |
---|---|
name |
String
|
Returns | |
---|---|
NetworkInfo.State |