Added in API level 29

DiscoveryStateListener


interface DiscoveryStateListener
android.net.wifi.p2p.WifiP2pManager.DiscoveryStateListener

Interface for callback invocation when p2p state is available in response to requestDiscoveryState.

Summary

Public methods
abstract Unit

The requested p2p discovery state is available.

Public methods

onDiscoveryStateAvailable

Added in API level 29
abstract fun onDiscoveryStateAvailable(state: Int): Unit

The requested p2p discovery state is available.

Parameters
state Int: Wi-Fi p2p discovery state Value is android.net.wifi.p2p.WifiP2pManager#WIFI_P2P_DISCOVERY_STOPPED, or android.net.wifi.p2p.WifiP2pManager#WIFI_P2P_DISCOVERY_STARTED