Package com.microej.kf.util.net
Class OnNetworkStateChanged
- java.lang.Object
-
- android.net.ConnectivityManager.NetworkCallback
-
- com.microej.kf.util.net.OnNetworkStateChanged
-
public class OnNetworkStateChanged extends ConnectivityManager.NetworkCallback
Listen to network status changes. When connected list available network interfaces.
-
-
Constructor Summary
Constructors Constructor Description OnNetworkStateChanged()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidonAvailable(Network network)Called when the framework connects and has declared new network ready for use.voidonLost(Network network)Called when the framework has a hard loss of the network or when the graceful failure ends.-
Methods inherited from class android.net.ConnectivityManager.NetworkCallback
onCapabilitiesChanged
-
-
-
-
Method Detail
-
onAvailable
public void onAvailable(Network network)
Description copied from class:ConnectivityManager.NetworkCallbackCalled when the framework connects and has declared new network ready for use. This callback may be called more than once if theNetworkthat is satisfying the request changes.- Overrides:
onAvailablein classConnectivityManager.NetworkCallback- Parameters:
network- TheNetworkof the satisfying network.
-
onLost
public void onLost(Network network)
Description copied from class:ConnectivityManager.NetworkCallbackCalled when the framework has a hard loss of the network or when the graceful failure ends.- Overrides:
onLostin classConnectivityManager.NetworkCallback- Parameters:
network- TheNetworklost.
-
-