Language

WifiP2pManager.RequestDiscoveryState Method

Definition

Request p2p discovery state.

[Android.Runtime.Register("requestDiscoveryState", "(Landroid/net/wifi/p2p/WifiP2pManager$Channel;Landroid/net/wifi/p2p/WifiP2pManager$DiscoveryStateListener;)V", "GetRequestDiscoveryState_Landroid_net_wifi_p2p_WifiP2pManager_Channel_Landroid_net_wifi_p2p_WifiP2pManager_DiscoveryStateListener_Handler", ApiSince=29)]
public virtual void RequestDiscoveryState(Android.Net.Wifi.P2p.WifiP2pManager.Channel c, Android.Net.Wifi.P2p.WifiP2pManager.IDiscoveryStateListener listener);
[<Android.Runtime.Register("requestDiscoveryState", "(Landroid/net/wifi/p2p/WifiP2pManager$Channel;Landroid/net/wifi/p2p/WifiP2pManager$DiscoveryStateListener;)V", "GetRequestDiscoveryState_Landroid_net_wifi_p2p_WifiP2pManager_Channel_Landroid_net_wifi_p2p_WifiP2pManager_DiscoveryStateListener_Handler", ApiSince=29)>]
abstract member RequestDiscoveryState : Android.Net.Wifi.P2p.WifiP2pManager.Channel * Android.Net.Wifi.P2p.WifiP2pManager.IDiscoveryStateListener -> unit
override this.RequestDiscoveryState : Android.Net.Wifi.P2p.WifiP2pManager.Channel * Android.Net.Wifi.P2p.WifiP2pManager.IDiscoveryStateListener -> unit

Parameters

c
WifiP2pManager.Channel

The channel created by Initialize(Context, Looper, WifiP2pManager+IChannelListener). This value cannot be null.

listener
WifiP2pManager.IDiscoveryStateListener

for callback when discovery state is available. This value cannot be null.

Attributes

Remarks

Request p2p discovery state.

This state indicates whether p2p discovery has started or stopped. The valid value is one of WifiP2pDiscoveryStarted or WifiP2pDiscoveryStopped. The state is returned using the WifiP2pManager.IDiscoveryStateListener listener.

This state is also included in the WifiP2pDiscoveryChangedAction broadcast event with extra ExtraDiscoveryState.

Android reference for android.net.wifi.p2p.WifiP2pManager.requestDiscoveryState.

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to