Stay organized with collections
Save and categorize content based on your preferences.
ConnectivityManager.OnNetworkActiveListener
public
static
interface
ConnectivityManager.OnNetworkActiveListener
| android.net.ConnectivityManager.OnNetworkActiveListener
|
Callback for use with ConnectivityManager.addDefaultNetworkActiveListener
to find out when the system default network has gone in to a high power state.
Summary
Public methods |
abstract
void
|
onNetworkActive()
Called on the main thread of the process to report that the current data network
has become active, and it is now a good time to perform any pending network
operations.
|
Public methods
onNetworkActive
public abstract void onNetworkActive ()
Called on the main thread of the process to report that the current data network
has become active, and it is now a good time to perform any pending network
operations. Note that this listener only tells you when the network becomes
active; if at any other time you want to know whether it is active (and thus okay
to initiate network traffic), you can retrieve its instantaneous state with
ConnectivityManager.isDefaultNetworkActive.
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2026-08-03 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2026-08-03 UTC."],[],[]]