public abstract class NetworkReachabilityManager
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
protected java.util.List<NetworkReachabilityListener> |
listeners |
| Constructor and Description |
|---|
NetworkReachabilityManager() |
| Modifier and Type | Method and Description |
|---|---|
void |
addNetworkReachabilityListener(NetworkReachabilityListener listener)
Add Network Reachability Listener
|
abstract boolean |
isOnline() |
void |
notifyListenersNetworkReachable()
Notify listeners that the network is now reachable
|
void |
notifyListenersNetworkUneachable()
Notify listeners that the network is now unreachable
|
void |
removeNetworkReachabilityListener(NetworkReachabilityListener listener)
Remove Network Reachability Listener
|
abstract void |
startListening()
This method starts listening for network connectivity state changes.
|
abstract void |
stopListening()
This method stops this class from listening for network changes.
|
protected java.util.List<NetworkReachabilityListener> listeners
public void addNetworkReachabilityListener(NetworkReachabilityListener listener)
public void removeNetworkReachabilityListener(NetworkReachabilityListener listener)
public void notifyListenersNetworkReachable()
public void notifyListenersNetworkUneachable()
public abstract void startListening()
public abstract void stopListening()
public abstract boolean isOnline()