# WifiManager.WpsCallback

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

# WpsCallback

*** ** * ** ***

Kotlin\|[Java](https://developer.android.com/reference/android/net/wifi/WifiManager.WpsCallback "View this page in Java")  

```
abstract class WpsCallback
```

|---|--------------------------------------------------------------------------------------------------------------------------------------|
| [kotlin.Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html)                                                       ||
| ↳ | [android.net.wifi.WifiManager.WpsCallback](https://developer.android.com/reference/kotlin/android/net/wifi/WifiManager.WpsCallback#) |

*** ** * ** ***

| **This class was deprecated in API level 28.**
|
| This is deprecated

Interface for callback invocation on a start WPS action

## Summary

|                                                        Public constructors                                                         ||
|---------------------------------------------------------------------------------------------------------------------------------|---|
| [WpsCallback](https://developer.android.com/reference/kotlin/android/net/wifi/WifiManager.WpsCallback#WpsCallback())`()` <br /> |

|                                                                                                                                                            Public methods                                                                                                                                                             ||
|--------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| abstract[Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html) | [onFailed](https://developer.android.com/reference/kotlin/android/net/wifi/WifiManager.WpsCallback#onFailed(kotlin.Int))`(`reason:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`)` WPS operation failed         |
| abstract[Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html) | [onStarted](https://developer.android.com/reference/kotlin/android/net/wifi/WifiManager.WpsCallback#onStarted(kotlin.String))`(`pin:` `[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)!`)` WPS start succeeded |
| abstract[Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html) | [onSucceeded](https://developer.android.com/reference/kotlin/android/net/wifi/WifiManager.WpsCallback#onSucceeded())`()` WPS operation completed successfully                                                                                   |

## Public constructors

### WpsCallback

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

```
WpsCallback()
```

## Public methods

### onFailed

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

```
abstract fun onFailed(reason: Int): Unit
```

**Deprecated:** *This API is deprecated*

WPS operation failed

|                                                                                                                                                                                                                                                                                                                                                                                                   Parameters                                                                                                                                                                                                                                                                                                                                                                                                    ||
|----------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `reason` | [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html):The reason for failure could be one of[WPS_TKIP_ONLY_PROHIBITED](https://developer.android.com/reference/kotlin/android/net/wifi/WifiManager#WPS_TKIP_ONLY_PROHIBITED:kotlin.Int),[WPS_OVERLAP_ERROR](https://developer.android.com/reference/kotlin/android/net/wifi/WifiManager#WPS_OVERLAP_ERROR:kotlin.Int),[WPS_WEP_PROHIBITED](https://developer.android.com/reference/kotlin/android/net/wifi/WifiManager#WPS_WEP_PROHIBITED:kotlin.Int),[WPS_TIMED_OUT](https://developer.android.com/reference/kotlin/android/net/wifi/WifiManager#WPS_TIMED_OUT:kotlin.Int)or[WPS_AUTH_FAILURE](https://developer.android.com/reference/kotlin/android/net/wifi/WifiManager#WPS_AUTH_FAILURE:kotlin.Int)and some generic errors. |

### onStarted

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

```
abstract fun onStarted(pin: String!): Unit
```

**Deprecated:** *This API is deprecated*

WPS start succeeded  

### onSucceeded

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

```
abstract fun onSucceeded(): Unit
```

**Deprecated:** *This API is deprecated*

WPS operation completed successfully