Added in API level 34

WifiManager.LocalOnlyConnectionFailureListener


public static interface WifiManager.LocalOnlyConnectionFailureListener

android.net.wifi.WifiManager.LocalOnlyConnectionFailureListener


Interface for local-only connection failure listener. Should be implemented by applications and set when calling WifiManager#addLocalOnlyConnectionFailureListener(Executor, LocalOnlyConnectionFailureListener)

Summary

Public methods

abstract void onConnectionFailed(WifiNetworkSpecifier wifiNetworkSpecifier, int failureReason)

Called when the framework attempted to connect to a local-only network requested by the registering app, but the connection to the network failed.

Public methods

onConnectionFailed

Added in API level 34
public abstract void onConnectionFailed (WifiNetworkSpecifier wifiNetworkSpecifier, 
                int failureReason)

Called when the framework attempted to connect to a local-only network requested by the registering app, but the connection to the network failed.

Parameters
wifiNetworkSpecifier WifiNetworkSpecifier: The WifiNetworkSpecifier which failed to connect. This value cannot be null.

failureReason int: the connection failure reason code. Value is WifiManager.STATUS_LOCAL_ONLY_CONNECTION_FAILURE_UNKNOWN, WifiManager.STATUS_LOCAL_ONLY_CONNECTION_FAILURE_ASSOCIATION, WifiManager.STATUS_LOCAL_ONLY_CONNECTION_FAILURE_AUTHENTICATION, WifiManager.STATUS_LOCAL_ONLY_CONNECTION_FAILURE_IP_PROVISIONING, WifiManager.STATUS_LOCAL_ONLY_CONNECTION_FAILURE_NOT_FOUND, or WifiManager.STATUS_LOCAL_ONLY_CONNECTION_FAILURE_NO_RESPONSE