Added in [API level 30](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

# WifiManager.SuggestionConnectionStatusListener

*** ** * ** ***

` public static interface WifiManager.SuggestionConnectionStatusListener `   
` `

|---|
| android.net.wifi.WifiManager.SuggestionConnectionStatusListener |

<br />

*** ** * ** ***

Interface for suggestion connection status listener. Should be implemented by applications and set when calling `https://developer.android.com/reference/android/net/wifi/WifiManager#addSuggestionConnectionStatusListener(java.util.concurrent.Executor,%20android.net.wifi.WifiManager.SuggestionConnectionStatusListener)`.

## Summary

| ### Public methods ||
|---|---|
| ` abstract void` | ` https://developer.android.com/reference/android/net/wifi/WifiManager.SuggestionConnectionStatusListener#onConnectionStatus(android.net.wifi.WifiNetworkSuggestion,%20int)(https://developer.android.com/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. |

## Public methods

### onConnectionStatus

Added in [API level 30](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
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.

<br />

| Parameters ||
|---|---|
| `wifiNetworkSuggestion` | `WifiNetworkSuggestion`: The suggestion which failed to connect. This value cannot be `null`. <br /> |
| `failureReason` | `int`: the connection failure reason code. Value is one of the following: - `https://developer.android.com/reference/android/net/wifi/WifiManager#STATUS_SUGGESTION_CONNECTION_FAILURE_UNKNOWN` - `https://developer.android.com/reference/android/net/wifi/WifiManager#STATUS_SUGGESTION_CONNECTION_FAILURE_ASSOCIATION` - `https://developer.android.com/reference/android/net/wifi/WifiManager#STATUS_SUGGESTION_CONNECTION_FAILURE_AUTHENTICATION` - `https://developer.android.com/reference/android/net/wifi/WifiManager#STATUS_SUGGESTION_CONNECTION_FAILURE_IP_PROVISIONING` |