Can I use Wi-Fi to transfer data / messages between two Android phones that are not connected to the router?

I know that if two Android phones are connected to the same Wi-Fi network, they can implement socket programming for transferring data between them. But I really want to know if you can use Wi-Fi as a transmission medium between two Android phones, like are you bluetooth

+4
source share
4 answers

You can use the ad-hoc network on one phone (which should be Android 2.2. +) To create a Wi-Fi access point and connect a second phone to it. I'm not sure there is still an API. This question may help, although this is not recommended (see comments in this question).

0
source

In Android 2.2+, you can create a WiFi hotspot on one device so that you can connect another device. Internet connection on any device is not required.

0
source

What you are looking for is an ad-hoc wireless network that is poorly supported on the Android platform. (but some people bravely rooted their phones and turned on functionality)

Alternatively, some Android builds (root or not) will support the functionality of Wi-Fi access points. Not all carriers will allow this.

Possible duplicate question .

0
source
For faster transmission of data over wifi can be done by using "WifiDirect" which is a "p2p" connection. so that this will transfer the data from one to other device without an Intermediate(Socket). For Example catch 

this link is in Google developers wifip2p and P2P connection with Wi-Fi

Catch a sample in Github WifiDirectFileTransfer

0
source

All Articles