Package | Description |
---|---|
android.net |
Modifier and Type | Method and Description |
---|---|
Network |
ConnectivityManager.getActiveNetwork()
Returns a
Network object corresponding to the currently active default data network. |
Network[] |
ConnectivityManager.getAllNetworks()
Returns an array of all
Network currently tracked by the framework. |
Modifier and Type | Method and Description |
---|---|
protected void |
ConnectivityManager.doNotifyAvailabilityChange(Network network,
boolean available,
ConnectivityManager.NetworkCallback[] networkCallbacks)
Notify the networkCallbacks about an availability change.
|
protected void |
ConnectivityManager.doNotifyCapabilitiesChange(Network network,
NetworkCapabilities capabilities,
ConnectivityManager.NetworkCallback[] networkCallBacks)
Notify the callback of a capabilities change.
|
NetworkCapabilities |
ConnectivityManager.getNetworkCapabilities(Network network)
Get the
NetworkCapabilities for the given Network. |
NetworkInfo |
ConnectivityManager.getNetworkInfo(Network network)
Returns connection status information about a particular Network.
|
protected void |
ConnectivityManager.notifyNetworkCallbacks(Network network,
boolean available)
Notifies a network availability change.
|
protected void |
ConnectivityManager.notifyNetworkCallbacks(Network network,
NetworkCapabilities capabilities)
Notifies a network capability change.
|
void |
ConnectivityManager.NetworkCallback.onAvailable(Network network)
Called when the framework connects and has declared new network ready for use.
|
void |
ConnectivityManager.NetworkCallback.onCapabilitiesChanged(Network network,
NetworkCapabilities networkCapabilities)
Called when the network the framework connected to for this request changes capabilities but still satisfies
the stated need.
|
void |
ConnectivityManager.NetworkCallback.onLost(Network network)
Called when the framework has a hard loss of the network or when the graceful failure ends.
|
protected void |
ConnectivityManager.setActiveNetwork(Network network)
Sets the active network.
|
protected void |
ConnectivityManager.setAvailable(boolean available,
Network network,
NetworkInfo networkInfo)
Sets the network availability.
|