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

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