public class NetworkUtilImpl extends java.lang.Object implements NetworkUtil, NetworkEventProvider
NetworkUtil.NetworkStatusNetworkEventProvider.ListenerDISCONNECTED, METERED, UNMETERED| Constructor and Description |
|---|
NetworkUtilImpl(android.content.Context context) |
| Modifier and Type | Method and Description |
|---|---|
int |
getNetworkStatus(android.content.Context context)
Returns the current connection status.
|
void |
setListener(NetworkEventProvider.Listener listener) |
public int getNetworkStatus(android.content.Context context)
NetworkUtilNetworkUtil.UNMETERED if there is an internet connection or NetworkUtil.DISCONNECTED if there is no
connection.getNetworkStatus in interface NetworkUtilcontext - The application contextNetworkUtil.DISCONNECTED,
NetworkUtil.METERED or NetworkUtil.UNMETERED.public void setListener(NetworkEventProvider.Listener listener)
setListener in interface NetworkEventProvider