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.WpsCallback\n\nAdded in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \nDeprecated in [API level 28](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)\n\nWpsCallback\n===========\n\n*** ** * ** ***\n\nKotlin \\|[Java](/reference/android/net/wifi/WifiManager.WpsCallback \"View this page in Java\") \n\n```\nabstract class WpsCallback\n```\n\n|---|-----------------------------------------------|\n| [kotlin.Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html) ||\n| ↳ | [android.net.wifi.WifiManager.WpsCallback](#) |\n\n*** ** * ** ***\n\n| **This class was deprecated in API level 28.**\n|\n| This is deprecated\n\nInterface for callback invocation on a start WPS action\n\nSummary\n-------\n\n| Public constructors ||\n|------------------------------------------|---|\n| [WpsCallback](#WpsCallback())`()` \u003cbr /\u003e |\n\n| Public methods ||\n|---------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------|\n| abstract [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html) | [onFailed](#onFailed(kotlin.Int))`(`reason:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`)` WPS operation failed |\n| abstract [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html) | [onStarted](#onStarted(kotlin.String))`(`pin:` `[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)!`)` WPS start succeeded |\n| abstract [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html) | [onSucceeded](#onSucceeded())`()` WPS operation completed successfully |\n\nPublic constructors\n-------------------\n\n### WpsCallback\n\nAdded in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nWpsCallback()\n```\n\nPublic methods\n--------------\n\n### onFailed\n\nAdded in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nabstract fun onFailed(reason: Int): Unit\n```\n\n**Deprecated:** *This API is deprecated*\n\nWPS operation failed\n\n| Parameters ||\n|----------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `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](/reference/kotlin/android/net/wifi/WifiManager#WPS_TKIP_ONLY_PROHIBITED:kotlin.Int), [WPS_OVERLAP_ERROR](/reference/kotlin/android/net/wifi/WifiManager#WPS_OVERLAP_ERROR:kotlin.Int), [WPS_WEP_PROHIBITED](/reference/kotlin/android/net/wifi/WifiManager#WPS_WEP_PROHIBITED:kotlin.Int), [WPS_TIMED_OUT](/reference/kotlin/android/net/wifi/WifiManager#WPS_TIMED_OUT:kotlin.Int) or [WPS_AUTH_FAILURE](/reference/kotlin/android/net/wifi/WifiManager#WPS_AUTH_FAILURE:kotlin.Int) and some generic errors. |\n\n### onStarted\n\nAdded in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nabstract fun onStarted(pin: String!): Unit\n```\n\n**Deprecated:** *This API is deprecated*\n\nWPS start succeeded \n\n### onSucceeded\n\nAdded in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nabstract fun onSucceeded(): Unit\n```\n\n**Deprecated:** *This API is deprecated*\n\nWPS operation completed successfully"]]