Stay organized with collections
Save and categorize content based on your preferences.
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
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.
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.
[null,null,["Last updated 2025-02-10 UTC."],[],[],null,["# WifiManager.SuggestionConnectionStatusListener\n\nAdded in [API level 30](/guide/topics/manifest/uses-sdk-element#ApiLevels) \n\nWifiManager.SuggestionConnectionStatusListener\n==============================================\n\n*** ** * ** ***\n\n[Kotlin](/reference/kotlin/android/net/wifi/WifiManager.SuggestionConnectionStatusListener \"View this page in Kotlin\") \\|Java\n\n\n`\npublic\nstatic\n\n\ninterface\nWifiManager.SuggestionConnectionStatusListener\n`\n\n\n`\n\n\n`\n\n|-----------------------------------------------------------------|\n| android.net.wifi.WifiManager.SuggestionConnectionStatusListener |\n\n\u003cbr /\u003e\n\n*** ** * ** ***\n\nInterface for suggestion connection status listener.\nShould be implemented by applications and set when calling\n[WifiManager.addSuggestionConnectionStatusListener(\nExecutor, SuggestionConnectionStatusListener)](/reference/android/net/wifi/WifiManager#addSuggestionConnectionStatusListener(java.util.concurrent.Executor,%20android.net.wifi.WifiManager.SuggestionConnectionStatusListener)).\n\nSummary\n-------\n\n| ### Public methods ||\n|------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ` abstract void` | ` `[onConnectionStatus](/reference/android/net/wifi/WifiManager.SuggestionConnectionStatusListener#onConnectionStatus(android.net.wifi.WifiNetworkSuggestion,%20int))`(`[WifiNetworkSuggestion](/reference/android/net/wifi/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. |\n\nPublic methods\n--------------\n\n### onConnectionStatus\n\nAdded in [API level 30](/guide/topics/manifest/uses-sdk-element#ApiLevels) \n\n```\npublic abstract void onConnectionStatus (WifiNetworkSuggestion wifiNetworkSuggestion, \n int failureReason)\n```\n\nCalled when the framework attempted to connect to a suggestion provided by the\nregistering app, but the connection to the suggestion failed.\n\n\u003cbr /\u003e\n\n| Parameters ||\n|-------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `wifiNetworkSuggestion` | `WifiNetworkSuggestion`: The suggestion which failed to connect. This value cannot be `null`. \u003cbr /\u003e |\n| `failureReason` | `int`: the connection failure reason code. Value is [WifiManager.STATUS_SUGGESTION_CONNECTION_FAILURE_UNKNOWN](/reference/android/net/wifi/WifiManager#STATUS_SUGGESTION_CONNECTION_FAILURE_UNKNOWN), [WifiManager.STATUS_SUGGESTION_CONNECTION_FAILURE_ASSOCIATION](/reference/android/net/wifi/WifiManager#STATUS_SUGGESTION_CONNECTION_FAILURE_ASSOCIATION), [WifiManager.STATUS_SUGGESTION_CONNECTION_FAILURE_AUTHENTICATION](/reference/android/net/wifi/WifiManager#STATUS_SUGGESTION_CONNECTION_FAILURE_AUTHENTICATION), or [WifiManager.STATUS_SUGGESTION_CONNECTION_FAILURE_IP_PROVISIONING](/reference/android/net/wifi/WifiManager#STATUS_SUGGESTION_CONNECTION_FAILURE_IP_PROVISIONING) \u003cbr /\u003e |"]]