Language

WifiP2pManager.RequestP2pState Method

Definition

Request p2p enabled state.

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

Parameters

c
WifiP2pManager.Channel

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

listener
WifiP2pManager.IP2pStateListener

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

Attributes

Remarks

Request p2p enabled state.

This state indicates whether Wi-Fi p2p is enabled or disabled. The valid value is one of WifiP2pStateDisabled or WifiP2pStateEnabled. The state is returned using the WifiP2pManager.IP2pStateListener listener.

This state is also included in the WifiP2pStateChangedAction broadcast event with extra ExtraWifiState.

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

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