Android.Net.Wifi.P2p.WifiP2pManager.CreateGroup Method
Create a p2p group with the current device as the group owner.

Syntax

[Android.Runtime.Register("createGroup", "(Landroid/net/wifi/p2p/WifiP2pManager$Channel;Landroid/net/wifi/p2p/WifiP2pManager$ActionListener;)V", "GetCreateGroup_Landroid_net_wifi_p2p_WifiP2pManager_Channel_Landroid_net_wifi_p2p_WifiP2pManager_ActionListener_Handler")]
public virtual void CreateGroup (WifiP2pManager.Channel c, WifiP2pManager.IActionListener listener)

Parameters

c
is the channel created at WifiP2pManager.Initialize(Android.Content.Context, Android.OS.Looper, Android.OS.Looper)
listener
for callbacks on success or failure. Can be null.

Remarks

Create a p2p group with the current device as the group owner. This essentially creates an access point that can accept connections from legacy clients as well as other p2p devices.

Note: This function would normally not be used unless the current device needs to form a p2p connection with a legacy client

The function call immediately returns after sending a group creation request to the framework. The application is notified of a success or failure to initiate group creation through listener callbacks NoType:android/net/wifi/p2p/WifiP2pManager$ActionListener;Href=../../../../../reference/android/net/wifi/p2p/WifiP2pManager.ActionListener.html#onSuccess() or NoType:android/net/wifi/p2p/WifiP2pManager$ActionListener;Href=../../../../../reference/android/net/wifi/p2p/WifiP2pManager.ActionListener.html#onFailure(int).

Application can request for the group details with WifiP2pManager.RequestGroupInfo(.Channel, .IGroupInfoListener).

[Android Documentation]

Requirements

Namespace: Android.Net.Wifi.P2p
Assembly: Mono.Android (in Mono.Android.dll)
Assembly Versions: 0.0.0.0
Since: Added in API level 14