We are trying to build an app where we need the WiFi direct application to check for Peers automatically and connect without any user intervention? I saw that we do have a Demo version in developers.android with a Demo but it has with Activity from user to check and connect.
Any help on how to do this/direction is appreciated.
Thanks.
There are some things that you should consider while sending data via wifi direct
Once connected, one device will be group owner and the other client
The group owner will have fixed IP address i.e. 192.168.49.1
You will know which became group owner only at runtime.
Once connected, you have to send some data from client to server that contains information about its IP address. This is done because server will have no idea of client's IP address.
That way, you can only send data. Because, by this time you will know which device has what IP address.
Cheers.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With