Stay organized with collections
Save and categorize content based on your preferences.
WifiP2pManager.ActionListener
public
static
interface
WifiP2pManager.ActionListener
android.net.wifi.p2p.WifiP2pManager.ActionListener
|
Interface for callback invocation on an application action
Summary
Public methods |
abstract
void
|
onFailure(int reason)
The operation failed
|
abstract
void
|
onSuccess()
The operation succeeded
|
Public methods
onFailure
public abstract void onFailure (int reason)
The operation failed
onSuccess
public abstract void onSuccess ()
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](/guide/topics/manifest/uses-sdk-element#ApiLevels) \n\nWifiP2pManager.ActionListener\n=============================\n\n*** ** * ** ***\n\n[Kotlin](/reference/kotlin/android/net/wifi/p2p/WifiP2pManager.ActionListener \"View this page in Kotlin\") \\|Java\n\n\n`\npublic\nstatic\n\n\ninterface\nWifiP2pManager.ActionListener\n`\n\n\n`\n\n\n`\n\n|----------------------------------------------------|\n| android.net.wifi.p2p.WifiP2pManager.ActionListener |\n\n\u003cbr /\u003e\n\n*** ** * ** ***\n\nInterface for callback invocation on an application action\n\nSummary\n-------\n\n| ### Public methods ||\n|------------------|----------------------------------------------------------------------------------------------------------------------------------|\n| ` abstract void` | ` `[onFailure](/reference/android/net/wifi/p2p/WifiP2pManager.ActionListener#onFailure(int))`(int reason) ` The operation failed |\n| ` abstract void` | ` `[onSuccess](/reference/android/net/wifi/p2p/WifiP2pManager.ActionListener#onSuccess())`() ` The operation succeeded |\n\nPublic methods\n--------------\n\n### onFailure\n\nAdded in [API level 14](/guide/topics/manifest/uses-sdk-element#ApiLevels) \n\n```\npublic abstract void onFailure (int reason)\n```\n\nThe operation failed\n\n\u003cbr /\u003e\n\n| Parameters ||\n|----------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `reason` | `int`: The reason for failure could be one of [WifiP2pManager.P2P_UNSUPPORTED](/reference/android/net/wifi/p2p/WifiP2pManager#P2P_UNSUPPORTED), [WifiP2pManager.ERROR](/reference/android/net/wifi/p2p/WifiP2pManager#ERROR) or [WifiP2pManager.BUSY](/reference/android/net/wifi/p2p/WifiP2pManager#BUSY) \u003cbr /\u003e |\n\n### onSuccess\n\nAdded in [API level 14](/guide/topics/manifest/uses-sdk-element#ApiLevels) \n\n```\npublic abstract void onSuccess ()\n```\n\nThe operation succeeded\n\n\u003cbr /\u003e"]]