Android - create wifi direct p2p group for multiple devices

I want to create a group for multiple devices by wifi direct p2p protocol in a specific way. I want to collect data from other devices onto one device. I have to make a receiver device, group owner. for example, by clicking a button, he has to create a group and send the broadcast to others so that they will automatically join the group. (I know the device must first accept the connection, but I'm guessing we don't need it.)

I've searched a lot but I can't find any clues. I appreciate any advice or comments on my problem.

+3


source to share


1 answer


Basically, there are no translations in the API.

instead, you use createGroup to form the group, then create a local service and then make sure the peerDiscovery is detected (I'm sure the device and the local service are only visible to others when the API is active)



Otherwise, just search for Peer / Service and connect as soon as you find what you are looking for.

You can also bypass the dialog, I explained two ways in the blog .

+5


source







All Articles