This repository will hold an example project that demonstrates how we could communicate between two Android devices using Socket NIO and WiFiDirect. The base code was taken from here.
- Install this app on two Android device (WiFi Direct dosent work on the simulator)
- Turn on WiFi Direct from the Settings -> Wi-Fi -> Advanced Settings -> Wi-Fi Direct
- As soon as the app installs on the device it starts looking for Peers
- Once the Peers are found they are listed on the App
- Clicking on available device will initiate the connection
- Once connection is successful you should see two buttons
DisconnectandSend Message - Clicking on
Disconnectwith disconnect the channel and start looking for peers again - Clicking on
Send Messagewill send a sample message to the connected device. - The communication between the devices is done using Socket NIO and to make sure everything is working fine check
LogCat