Stay organized with collections
Save and categorize content based on your preferences.
SuggestionConnectionStatusListener
interface SuggestionConnectionStatusListener
Interface for suggestion connection status listener. Should be implemented by applications and set when calling WifiManager.addSuggestionConnectionStatusListener(
.
Summary
Public methods |
abstract Unit |
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
abstract fun onConnectionStatus(
wifiNetworkSuggestion: WifiNetworkSuggestion,
failureReason: Int
): Unit
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.
[[["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.SuggestionConnectionStatusListener\n\nAdded in [API level 30](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)\n\nSuggestionConnectionStatusListener\n==================================\n\n*** ** * ** ***\n\nKotlin \\|[Java](/reference/android/net/wifi/WifiManager.SuggestionConnectionStatusListener \"View this page in Java\") \n\n```\ninterface SuggestionConnectionStatusListener\n```\n\n|----------------------------------------------------------------------|\n| [android.net.wifi.WifiManager.SuggestionConnectionStatusListener](#) |\n\nInterface for suggestion connection status listener. Should be implemented by applications and set when calling [WifiManager.addSuggestionConnectionStatusListener(](/reference/kotlin/android/net/wifi/WifiManager#addSuggestionConnectionStatusListener(java.util.concurrent.Executor,%20android.net.wifi.WifiManager.SuggestionConnectionStatusListener)).\n\nSummary\n-------\n\n| Public methods ||\n|---------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| abstract [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html) | [onConnectionStatus](#onConnectionStatus(android.net.wifi.WifiNetworkSuggestion,%20kotlin.Int))`(`wifiNetworkSuggestion:` `[WifiNetworkSuggestion](/reference/kotlin/android/net/wifi/WifiNetworkSuggestion)`, `failureReason:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`)` 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](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nabstract fun onConnectionStatus(\n wifiNetworkSuggestion: WifiNetworkSuggestion, \n failureReason: Int\n): Unit\n```\n\nCalled when the framework attempted to connect to a suggestion provided by the registering app, but the connection to the suggestion failed.\n\n| Parameters ||\n|-------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `wifiNetworkSuggestion` | [WifiNetworkSuggestion](/reference/kotlin/android/net/wifi/WifiNetworkSuggestion): The suggestion which failed to connect. This value cannot be `null`. |\n| `failureReason` | [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html): the connection failure reason code. Value is [android.net.wifi.WifiManager#STATUS_SUGGESTION_CONNECTION_FAILURE_UNKNOWN](/reference/kotlin/android/net/wifi/WifiManager#STATUS_SUGGESTION_CONNECTION_FAILURE_UNKNOWN:kotlin.Int), [android.net.wifi.WifiManager#STATUS_SUGGESTION_CONNECTION_FAILURE_ASSOCIATION](/reference/kotlin/android/net/wifi/WifiManager#STATUS_SUGGESTION_CONNECTION_FAILURE_ASSOCIATION:kotlin.Int), [android.net.wifi.WifiManager#STATUS_SUGGESTION_CONNECTION_FAILURE_AUTHENTICATION](/reference/kotlin/android/net/wifi/WifiManager#STATUS_SUGGESTION_CONNECTION_FAILURE_AUTHENTICATION:kotlin.Int), or [android.net.wifi.WifiManager#STATUS_SUGGESTION_CONNECTION_FAILURE_IP_PROVISIONING](/reference/kotlin/android/net/wifi/WifiManager#STATUS_SUGGESTION_CONNECTION_FAILURE_IP_PROVISIONING:kotlin.Int) |"]]