This is a demo application highlighting how to make peer to peer network connections with the Wi-Fi Direct APIs. The application allows you to transfer jpeg images from the gallery after a succesful connection.

The source code for this demo app shows how to accomplish three key things with Wi-Fi Direct APIs: Discovering peers, connecting using Wi-Fi Direct APIs, and finding group details post connection, so that a TCP socket can be opened to transfer files.

The application includes:

If you are developing an application that uses the Wi-Fi Direct APIs, remember that the feature is supported only on Android 4.0 (API level 14) and higher versions of the platform. To ensure that your application can only be installed on devices that are capable of supporting Wi-Fi Direct mode, remember to add the following to the application's manifest before publishing to Google Play:

To control how Google Play filters your application from devices that do not support Wi-Fi Direct mode, remember to add the following to the application's manifest

For more information about using the Wi-Fi Direct API, see the android.net.wifi.p2p documentation.