Added in API level 30

WifiManager.SuggestionConnectionStatusListener


public static interface WifiManager.SuggestionConnectionStatusListener

android.net.wifi.WifiManager.SuggestionConnectionStatusListener


Interface for suggestion connection status listener. Should be implemented by applications and set when calling WifiManager#addSuggestionConnectionStatusListener( Executor, SuggestionConnectionStatusListener).

Summary

Public methods

abstract void onConnectionStatus(WifiNetworkSuggestion wifiNetworkSuggestion, int failureReason)

Called when the framework attempted to connect to a suggestion provided by the registering app, but the connection to the suggestion failed.

Public methods

onConnectionStatus

Added in API level 30
public abstract void onConnectionStatus (WifiNetworkSuggestion wifiNetworkSuggestion, 
                int failureReason)

Called when the framework attempted to connect to a suggestion provided by the registering app, but the connection to the suggestion failed.

Parameters
wifiNetworkSuggestion WifiNetworkSuggestion: The suggestion which failed to connect. This value cannot be null.

failureReason int: the connection failure reason code. Value is WifiManager.STATUS_SUGGESTION_CONNECTION_FAILURE_UNKNOWN, WifiManager.STATUS_SUGGESTION_CONNECTION_FAILURE_ASSOCIATION, WifiManager.STATUS_SUGGESTION_CONNECTION_FAILURE_AUTHENTICATION, or WifiManager.STATUS_SUGGESTION_CONNECTION_FAILURE_IP_PROVISIONING