Language

WifiP2pManager.RequestNetworkInfo Method

Definition

Request network info.

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

Parameters

c
WifiP2pManager.Channel

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

listener
WifiP2pManager.INetworkInfoListener

for callback when network info is available. This value cannot be null.

Attributes

Remarks

Request network info.

This method provides the network info in the form of a NetworkInfo. IsAvailable indicates the p2p availability and GetDetailedState() reports the current fine-grained state of the network. This NetworkInfo is returned using the WifiP2pManager.INetworkInfoListener listener.

This information is also included in the WifiP2pConnectionChangedAction broadcast event with extra ExtraNetworkInfo.

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

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