Stay organized with collections
Save and categorize content based on your preferences.
WifiP2pManager.DiscoveryStateListener
public
static
interface
WifiP2pManager.DiscoveryStateListener
android.net.wifi.p2p.WifiP2pManager.DiscoveryStateListener
|
Interface for callback invocation when p2p state is available
in response to WifiP2pManager.requestDiscoveryState(Channel, DiscoveryStateListener)
.
Summary
Public methods
onDiscoveryStateAvailable
public abstract void onDiscoveryStateAvailable (int state)
The requested p2p discovery state is available.
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.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-02-10 UTC."],[],[],null,["# WifiP2pManager.DiscoveryStateListener\n\nAdded in [API level 29](/guide/topics/manifest/uses-sdk-element#ApiLevels) \n\nWifiP2pManager.DiscoveryStateListener\n=====================================\n\n*** ** * ** ***\n\n[Kotlin](/reference/kotlin/android/net/wifi/p2p/WifiP2pManager.DiscoveryStateListener \"View this page in Kotlin\") \\|Java\n\n\n`\npublic\nstatic\n\n\ninterface\nWifiP2pManager.DiscoveryStateListener\n`\n\n\n`\n\n\n`\n\n|------------------------------------------------------------|\n| android.net.wifi.p2p.WifiP2pManager.DiscoveryStateListener |\n\n\u003cbr /\u003e\n\n*** ** * ** ***\n\nInterface for callback invocation when p2p state is available\nin response to [WifiP2pManager.requestDiscoveryState(Channel, DiscoveryStateListener)](/reference/android/net/wifi/p2p/WifiP2pManager#requestDiscoveryState(android.net.wifi.p2p.WifiP2pManager.Channel,%20android.net.wifi.p2p.WifiP2pManager.DiscoveryStateListener)).\n\nSummary\n-------\n\n| ### Public methods ||\n|------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ` abstract void` | ` `[onDiscoveryStateAvailable](/reference/android/net/wifi/p2p/WifiP2pManager.DiscoveryStateListener#onDiscoveryStateAvailable(int))`(int state) ` The requested p2p discovery state is available. |\n\nPublic methods\n--------------\n\n### onDiscoveryStateAvailable\n\nAdded in [API level 29](/guide/topics/manifest/uses-sdk-element#ApiLevels) \n\n```\npublic abstract void onDiscoveryStateAvailable (int state)\n```\n\nThe requested p2p discovery state is available.\n\n\u003cbr /\u003e\n\n| Parameters ||\n|---------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `state` | `int`: Wi-Fi p2p discovery state Value is [WifiP2pManager.WIFI_P2P_DISCOVERY_STOPPED](/reference/android/net/wifi/p2p/WifiP2pManager#WIFI_P2P_DISCOVERY_STOPPED), or [WifiP2pManager.WIFI_P2P_DISCOVERY_STARTED](/reference/android/net/wifi/p2p/WifiP2pManager#WIFI_P2P_DISCOVERY_STARTED) \u003cbr /\u003e |\n\n**See also:**\n\n- [WifiP2pManager.WIFI_P2P_DISCOVERY_STARTED](/reference/android/net/wifi/p2p/WifiP2pManager#WIFI_P2P_DISCOVERY_STARTED)\n- [WifiP2pManager.WIFI_P2P_DISCOVERY_STOPPED](/reference/android/net/wifi/p2p/WifiP2pManager#WIFI_P2P_DISCOVERY_STOPPED)"]]