Can I use WiFi to transfer data/messages between two android phones, not connected to a router?

倖福魔咒の 提交于 2019-12-05 17:19:07

With Android 2.2+ it is possible to create a WiFi hot-spot on one device so another device can connect. Internet connection on either device is not required.

mpontillo

What you are looking for is ad-hoc wireless networking, which is not well supported on the Android platform. (but some people have bravely rooted their phones and enabled the functionality)

As an alternative, some builds of Android (rooted or not) will support WiFi hotspot functionality. Not all carriers will enable this.

Possible duplicate question.

You can try to use ad-hoc networking on one phone (which has to be Android 2.2.+) to create a Wi-Fi hotspot and connect with the second phone to that. I'm not sure if theres an API yet, I believe not. This question may help, altough it's not recommmend (See the comments in that question).

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 in google developers wifip2p and P2P Connection with Wi-Fi

Catch a sample in Github WifiDirectFileTransfer

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!