Stay organized with collections
Save and categorize content based on your preferences.
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
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.
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2025-02-10 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-02-10 UTC."],[],[],null,["# WifiManager.LocalOnlyConnectionFailureListener\n\nAdded in [API level 34](/guide/topics/manifest/uses-sdk-element#ApiLevels) \n\nWifiManager.LocalOnlyConnectionFailureListener\n==============================================\n\n*** ** * ** ***\n\n[Kotlin](/reference/kotlin/android/net/wifi/WifiManager.LocalOnlyConnectionFailureListener \"View this page in Kotlin\") \\|Java\n\n\n`\npublic\nstatic\n\n\ninterface\nWifiManager.LocalOnlyConnectionFailureListener\n`\n\n\n`\n\n\n`\n\n|-----------------------------------------------------------------|\n| android.net.wifi.WifiManager.LocalOnlyConnectionFailureListener |\n\n\u003cbr /\u003e\n\n*** ** * ** ***\n\nInterface for local-only connection failure listener.\nShould be implemented by applications and set when calling\n[WifiManager.addLocalOnlyConnectionFailureListener(Executor, LocalOnlyConnectionFailureListener)](/reference/android/net/wifi/WifiManager#addLocalOnlyConnectionFailureListener(java.util.concurrent.Executor,%20android.net.wifi.WifiManager.LocalOnlyConnectionFailureListener))\n\nSummary\n-------\n\n| ### Public methods ||\n|------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ` abstract void` | ` `[onConnectionFailed](/reference/android/net/wifi/WifiManager.LocalOnlyConnectionFailureListener#onConnectionFailed(android.net.wifi.WifiNetworkSpecifier,%20int))`(`[WifiNetworkSpecifier](/reference/android/net/wifi/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. |\n\nPublic methods\n--------------\n\n### onConnectionFailed\n\nAdded in [API level 34](/guide/topics/manifest/uses-sdk-element#ApiLevels) \n\n```\npublic abstract void onConnectionFailed (WifiNetworkSpecifier wifiNetworkSpecifier, \n int failureReason)\n```\n\nCalled when the framework attempted to connect to a local-only network requested by the\nregistering app, but the connection to the network failed.\n\n\u003cbr /\u003e\n\n| Parameters ||\n|------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `wifiNetworkSpecifier` | `WifiNetworkSpecifier`: The [WifiNetworkSpecifier](/reference/android/net/wifi/WifiNetworkSpecifier) which failed to connect. This value cannot be `null`. \u003cbr /\u003e |\n| `failureReason` | `int`: the connection failure reason code. Value is [WifiManager.STATUS_LOCAL_ONLY_CONNECTION_FAILURE_UNKNOWN](/reference/android/net/wifi/WifiManager#STATUS_LOCAL_ONLY_CONNECTION_FAILURE_UNKNOWN), [WifiManager.STATUS_LOCAL_ONLY_CONNECTION_FAILURE_ASSOCIATION](/reference/android/net/wifi/WifiManager#STATUS_LOCAL_ONLY_CONNECTION_FAILURE_ASSOCIATION), [WifiManager.STATUS_LOCAL_ONLY_CONNECTION_FAILURE_AUTHENTICATION](/reference/android/net/wifi/WifiManager#STATUS_LOCAL_ONLY_CONNECTION_FAILURE_AUTHENTICATION), [WifiManager.STATUS_LOCAL_ONLY_CONNECTION_FAILURE_IP_PROVISIONING](/reference/android/net/wifi/WifiManager#STATUS_LOCAL_ONLY_CONNECTION_FAILURE_IP_PROVISIONING), [WifiManager.STATUS_LOCAL_ONLY_CONNECTION_FAILURE_NOT_FOUND](/reference/android/net/wifi/WifiManager#STATUS_LOCAL_ONLY_CONNECTION_FAILURE_NOT_FOUND), [WifiManager.STATUS_LOCAL_ONLY_CONNECTION_FAILURE_NO_RESPONSE](/reference/android/net/wifi/WifiManager#STATUS_LOCAL_ONLY_CONNECTION_FAILURE_NO_RESPONSE), or [WifiManager.STATUS_LOCAL_ONLY_CONNECTION_FAILURE_USER_REJECT](/reference/android/net/wifi/WifiManager#STATUS_LOCAL_ONLY_CONNECTION_FAILURE_USER_REJECT) \u003cbr /\u003e |"]]