Android 上的临时通信(消息传递)系统
我正在寻找在 Android 上实现临时类型消息服务的可行性。基本上,我希望多个 Android 用户能够在没有蜂窝连接的情况下进行通信(此时文本就足够了)。但可以有一个集中的接入点。例如带有无线路由器的低功耗计算机。
实施这样的事情的最佳方法是什么?我正在考虑使用XMPP。可以使用计算机作为XMPP服务器并让Android用户连接到它。这是一个合理的做法吗?
任何建议都非常受欢迎。 谢谢。
I am looking for the feasibility of implementing an ad-hoc type messaging service on Android. Basically I want a several Android users to be able to communicate (text is enough at this point) without having a cellular connection. But there can be a centralized access point. For example a low-power computer with a wireless router.
What is the best way to implement something like this? I was thinking using XMPP. Could use the computer as the XMPP server and let Android users connect to it. Is this a reasonable approach?
Any suggestions are greatly welcomed.
Thank you.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
Adhoc 和 XMPP 在这种情况下组合在一起如下:电话之间的网络连接是 adhoc; XMPP 定义客户端到客户端的无服务器消息传递。需要解决两个问题:
1)临时 Android 连接 - 我不清楚这是否通常是 可能
2) 找到支持 xep-0174 协议的 XMPP Android 客户端库。 Smack 库支持这一点,我认为它目前在 Android 中运行。
Adhoc and XMPP fit together in this context as follows: the network connections between the phones are adhoc; XMPP defines client to client server-less messaging. Two issues need be solved:
1) The adhoc Android connections - not clear to me if this is generally possible
2) Finding an XMPP Android client library that supports the xep-0174 protocols. The Smack library supports this, and I think it currently runs in Android.
由于您使用的是集中式接入点,因此很简单,您可以在不同设备之间打开套接字连接并交换所需的数据。我不确定你为什么称其为临时的。
Since you are using a centralized access point, it is straight forward, you open a socket connection between the different devices and exchange the data you need. I am not sure why you call it ad hoc though.