ConnectivityDiagnosticsManager.ConnectivityDiagnosticsCallback


public static abstract class ConnectivityDiagnosticsManager.ConnectivityDiagnosticsCallback
extends Object

java.lang.Object
   ↳ android.net.ConnectivityDiagnosticsManager.ConnectivityDiagnosticsCallback


Abstract base class for Connectivity Diagnostics callbacks. Used for notifications about network connectivity events. Must be extended by applications wanting notifications.

Summary

Public constructors

ConnectivityDiagnosticsCallback()

Public methods

void onConnectivityReportAvailable(ConnectivityDiagnosticsManager.ConnectivityReport report)

Called when the platform completes a data connectivity check.

void onDataStallSuspected(ConnectivityDiagnosticsManager.DataStallReport report)

Called when the platform suspects a data stall on some Network.

void onNetworkConnectivityReported(Network network, boolean hasConnectivity)

Called when any app reports connectivity to the System.

Inherited methods

Object clone()

Creates and returns a copy of this object.

boolean equals(Object obj)

Indicates whether some other object is "equal to" this one.

void finalize()

Called by the garbage collector on an object when garbage collection determines that there are no more references to the object.

final Class<?> getClass()

Returns the runtime class of this Object.

int hashCode()

Returns a hash code value for the object.

final void notify()

Wakes up a single thread that is waiting on this object's monitor.

final void notifyAll()

Wakes up all threads that are waiting on this object's monitor.

String toString()

Returns a string representation of the object.

final void wait(long timeoutMillis, int nanos)

Causes the current thread to wait until it is awakened, typically by being notified or interrupted, or until a certain amount of real time has elapsed.

final void wait(long timeoutMillis)

Causes the current thread to wait until it is awakened, typically by being notified or interrupted, or until a certain amount of real time has elapsed.

final void wait()

Causes the current thread to wait until it is awakened, typically by being notified or interrupted.

Public constructors

ConnectivityDiagnosticsCallback

Added in API level 30
public ConnectivityDiagnosticsCallback ()

Public methods

onConnectivityReportAvailable

Added in API level 30
public void onConnectivityReportAvailable (ConnectivityDiagnosticsManager.ConnectivityReport report)

Called when the platform completes a data connectivity check. This will also be invoked immediately upon registration for each network matching the request with the latest report, if a report has already been generated for that network.

The Network specified in the ConnectivityReport may not be active any more when this method is invoked.

Parameters
report ConnectivityDiagnosticsManager.ConnectivityReport: The ConnectivityReport containing information about a connectivity check This value cannot be null.

onDataStallSuspected

Added in API level 30
public void onDataStallSuspected (ConnectivityDiagnosticsManager.DataStallReport report)

Called when the platform suspects a data stall on some Network.

The Network specified in the DataStallReport may not be active any more when this method is invoked.

Parameters
report ConnectivityDiagnosticsManager.DataStallReport: The DataStallReport containing information about the suspected data stall This value cannot be null.

onNetworkConnectivityReported

Added in API level 30
public void onNetworkConnectivityReported (Network network, 
                boolean hasConnectivity)

Called when any app reports connectivity to the System.

Parameters
network Network: The Network for which connectivity has been reported This value cannot be null.

hasConnectivity boolean: The connectivity reported to the System