-1

I am really new to android. I have a project in which I need to develop quiz over wifi.

I have seen android's official tutorials regarding wifip2p.

Now I want design a client - server like functionality,

For that all the devices needs to be connected to a single device.

There is a method to create Group in the API, But I am unable to understand how does the device will connect to a specific group as no ID is associated with the group.

I need to know how to connect to a specifi group using an ID or something similar.

I also want to know how to stop the server from getting connection.

And also how to assign a name to the client.

1 Answers1

0

Once a group is created, there are two ways to connect to a group that has been created using WifiP2pManager.createGroup. The first is by calling the WifiP2pManager.connect(WifiP2pManager.Channel, WifiP2pConfig, WifiP2pManager.ActionListener) method, which requires knowing the deviceAddress of the device that you wish to connect to and setting this in the WifiP2pConfig argument. The second is if the Group Owner gains access to the WPA key and makes it available to legacy clients using an out-of-bounds mechanism - WiFi Direct device connection with other Android devices

Stephen Naicken
  • 366
  • 2
  • 7