我可以使用 WiFi 在两部未连接到路由器的 Android 手机之间传输数据/消息吗?

发布于 2024-11-24 04:11:01 字数 103 浏览 2 评论 0原文

我知道如果两个Android手机连接到同一个wifi网络,它们可以实现套接字编程来在它们之间传输数据 但我其实想知道是否可以使用wifi作为两部Android手机之间的传输介质,就像蓝牙一样?

I'm aware that if two Android phones are connected to a same wifi network, they can implement socket programming to transfer data between them
But I actually want to know if you can use wifi as a transfer medium between two Android phones, just like you Bluetooth?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

ぃ双果 2024-12-01 04:11:01

使用 Android 2.2+ 可以在一台设备上创建 WiFi 热点,以便另一台设备可以连接。任一设备都不需要互联网连接。

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.

甜味拾荒者 2024-12-01 04:11:01

您正在寻找的是 ad-hoc 无线网络,在Android平台上没有得到很好的支持。 (但有些人勇敢地root了他们的手机并启用了该功能)

作为替代方案,某些Android版本(无论是否root)将支持WiFi热点功能。并非所有运营商都会启用此功能。

可能存在重复问题

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.

情深缘浅 2024-12-01 04:11:01

您可以尝试在一部手机(必须是 Android 2.2.+)上使用临时网络来创建 Wi-Fi 热点并与第二部手机连接。我不确定是否有 API,我相信没有。 这个问题可能会有所帮助,尽管不推荐(请参阅该问题中的评论)。

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).

夏了南城 2024-12-01 04:11:01
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 

谷歌开发人员中的此链接 wifip2p使用 Wi-Fi 进行 P2P 连接

在 Github 中获取示例 WifiDirectFileTransfer

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

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文