public interface SimpleNetworkCallback
Modifier and Type | Method and Description |
---|---|
void |
onConnectivity(boolean isConnected)
Called when the connectivity state changes.
|
void |
onInternet(boolean hasInternet)
Called when the Internet state change.
|
void onConnectivity(boolean isConnected)
isConnected
- true
if a network is available.ConnectivityManager.NetworkCallback.onAvailable(Network)
,
ConnectivityManager.NetworkCallback.onLost(Network)
void onInternet(boolean hasInternet)
hasInternet
- true
if Internet access is available.ConnectivityManager.NetworkCallback.onCapabilitiesChanged(Network, NetworkCapabilities)