how to do this on the phone?? I have Tried Google sample app and in that how to turn on Peer to peer and perform discovery from the action bar
In the settings menu, click on Network>>TCP/IP>>P2P. In the P2P menu, click on the check box in the Enable field to enable or disable your P2P connection. The status of the P2P connection will be listed in the Status field below. To save any changes to your device, click on Save.
Wi-Fi Direct (P2P) allows devices with the appropriate hardware to connect directly to each other via Wi-Fi without an intermediate access point.
Android P2P is now called WiFi Direct.
On the Settings panel select Wi-Fi. You'll see a list of WiFi networks but you want to click the menu button on the lower right (the vertical ...). This opens up a submenu with Wi-Fi Direct as one of the options, select it.
Do this same thing on your other phone. At the bottom of the panel is a 'search for devices' button, hit this on both phones and each should be able to discover the other one. One one of the phones press the name of the other device and then 'send invitation to connect'. The invitation should appear on the other device, accept it. If all goes well they will now be connected.
I did this procedure and was able to get the sample app to work, transferred a photo from my gallery on one phone to the other one.
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