| java.lang.Object | |
| ↳ | android.net.ConnectivityManager.NetworkCallback | 
Base class for NetworkRequest callbacks. Used for notifications about network changes. Should be extended by applications wanting notifications.
| Public Constructors | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Public Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| 
          Called when the framework connects and has declared new network ready for use.
          
    
         | |||||||||||
| 
          Called when the network the framework connected to for this request
 changes capabilities but still satisfies the stated need.
          
    
         | |||||||||||
| 
          Called when the network the framework connected to for this request
 changes  LinkProperties. | |||||||||||
| 
          Called when the network is about to be disconnected.
          
    
         | |||||||||||
| 
          Called when the framework has a hard loss of the network or when the
 graceful failure ends.
          
    
         | |||||||||||
| [Expand] Inherited Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
|  From class
  java.lang.Object | |||||||||||
Called when the network the framework connected to for this request changes capabilities but still satisfies the stated need.
| network | The Networkwhose capabilities have changed. | 
|---|---|
| networkCapabilities | The new NetworkCapabilitiesfor this network. | 
Called when the network the framework connected to for this request
 changes LinkProperties.
| network | The Networkwhose link properties have changed. | 
|---|---|
| linkProperties | The new LinkPropertiesfor this network. | 
Called when the network is about to be disconnected.  Often paired with an
 onAvailable(Network) call with the new replacement network
 for graceful handover.  This may not be called if we have a hard loss
 (loss without warning).  This may be followed by either a
 onLost(Network) call or a
 onAvailable(Network) call for this network depending
 on whether we lose or regain it.
| network | The Networkthat is about to be disconnected. | 
|---|---|
| maxMsToLive | The time in ms the framework will attempt to keep the network connected. Note that the network may suffer a hard loss at any time. | 
Called when the framework has a hard loss of the network or when the graceful failure ends.
| network | The Networklost. | 
|---|