public interface NetworkUtil
NetworkEventProvider
for best performance.Modifier and Type | Interface and Description |
---|---|
static interface |
NetworkUtil.NetworkStatus
Order of these constant values matter as they are relied upon to be incrementing in terms
of availability.
|
Modifier and Type | Field and Description |
---|---|
static int |
DISCONNECTED |
static int |
METERED |
static int |
UNMETERED |
Modifier and Type | Method and Description |
---|---|
int |
getNetworkStatus(android.content.Context context)
Returns the current connection status.
|
static final int DISCONNECTED
static final int METERED
static final int UNMETERED
int getNetworkStatus(android.content.Context context)
UNMETERED
if there is an internet connection or DISCONNECTED
if there is no
connection.context
- The application contextDISCONNECTED
,
METERED
or UNMETERED
.