Stay organized with collections
Save and categorize content based on your preferences.
ActionListener
interface ActionListener
Interface for callback invocation on an application action
Summary
Public methods |
abstract Unit |
The operation failed
|
abstract Unit |
The operation succeeded
|
Public methods
onFailure
abstract fun onFailure(reason: Int): Unit
The operation failed
onSuccess
abstract fun onSuccess(): Unit
The operation succeeded
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,["# WifiP2pManager.ActionListener\n\nAdded in [API level 14](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)\n\nActionListener\n==============\n\n*** ** * ** ***\n\nKotlin \\|[Java](/reference/android/net/wifi/p2p/WifiP2pManager.ActionListener \"View this page in Java\") \n\n```\ninterface ActionListener\n```\n\n|---------------------------------------------------------|\n| [android.net.wifi.p2p.WifiP2pManager.ActionListener](#) |\n\nInterface for callback invocation on an application action\n\nSummary\n-------\n\n| Public methods ||\n|---------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------|\n| abstract [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html) | [onFailure](#onFailure(kotlin.Int))`(`reason:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`)` The operation failed |\n| abstract [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html) | [onSuccess](#onSuccess())`()` The operation succeeded |\n\nPublic methods\n--------------\n\n### onFailure\n\nAdded in [API level 14](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nabstract fun onFailure(reason: Int): Unit\n```\n\nThe 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 [P2P_UNSUPPORTED](/reference/kotlin/android/net/wifi/p2p/WifiP2pManager#P2P_UNSUPPORTED:kotlin.Int), [ERROR](/reference/kotlin/android/net/wifi/p2p/WifiP2pManager#ERROR:kotlin.Int) or [BUSY](/reference/kotlin/android/net/wifi/p2p/WifiP2pManager#BUSY:kotlin.Int) |\n\n### onSuccess\n\nAdded in [API level 14](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nabstract fun onSuccess(): Unit\n```\n\nThe operation succeeded"]]