Android 使用 3g 进行点对点通信
我想使用 Android 手机中的 3g 数据连接发送一些位,例如少量数据(不是文本或文件)。我不想使用 Wifi,我需要一些东西,例如仅使用 Android 手机及其 3g/4g 功能的点对点连接或客户端服务器连接。
I want to send some bits like small amount of data (so not text or file) using 3g data connection in the android phones. I don't want to use Wifi and I need some thing like a peer-to-peer connection or client server connection using only the android phones and its 3g/4g functionalities.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您问题的第二部分过去已得到解答
检测Android上的网络连接类型
至于这些小数据,我建议每 30 秒左右发送一个 udp 数据包,以防止 ip 发生变化,按照这个问题答案的建议。
UDP 端口每次通过 3G 连接都会发生变化
The second part of your question has been answered in the past
Detect network connection type on Android
As for those small bits of data I suggest sending a udp packet every 30 seconds or so to prevent the ip from changing, as per the advice of this question answer.
UDP port changes every time over 3G connection