Added in API level 34

LocalOnlyConnectionFailureListener


interface 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 Unit
onConnectionFailed(wifiNetworkSpecifier: WifiNetworkSpecifier, failureReason: Int)

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
abstract fun onConnectionFailed(
    wifiNetworkSpecifier: WifiNetworkSpecifier,
    failureReason: Int
): Unit

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 one of the following: