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 android.net.wifi.WifiManager#STATUS_LOCAL_ONLY_CONNECTION_FAILURE_UNKNOWN, android.net.wifi.WifiManager#STATUS_LOCAL_ONLY_CONNECTION_FAILURE_ASSOCIATION, android.net.wifi.WifiManager#STATUS_LOCAL_ONLY_CONNECTION_FAILURE_AUTHENTICATION, android.net.wifi.WifiManager#STATUS_LOCAL_ONLY_CONNECTION_FAILURE_IP_PROVISIONING, android.net.wifi.WifiManager#STATUS_LOCAL_ONLY_CONNECTION_FAILURE_NOT_FOUND, android.net.wifi.WifiManager#STATUS_LOCAL_ONLY_CONNECTION_FAILURE_NO_RESPONSE, or android.net.wifi.WifiManager#STATUS_LOCAL_ONLY_CONNECTION_FAILURE_USER_REJECT |