需要帮助了解聊天、XMPP、jabber id 等
我正在创建一个在 iOS、Android、BB 和 Win7 上运行的移动应用程序。这是一个基于位置的应用程序,您可以加入群组,然后能够查看群组中其他成员的位置。这一切都很好。我目前正在使用 GAE 来管理组。
现在我想添加群组成员互相聊天的功能。没有一对一即时通讯,而是一对多聊天室。因此,当您访问应用程序中的某个群组时,您可以键入消息,该群组的所有其他成员都将能够看到您的消息。我开始走上移动推送(APNS、C2DM 等)之路,但认为必须有更好的方法。我只希望应用程序实际运行时收到消息,因此移动推送的重要部分在这种情况下并不重要。但我当然也不想进行民意调查。
因此,我开始研究 XMPP,它似乎是正确的解决方案,但我对这项技术还很陌生。我不希望用户必须已经拥有或使用他选择的某些服务创建一些在线 IM 状态。我只想在移动应用程序中有一个“用户名”首选项,这就是他需要做的一切。
所以这就是我真正需要帮助的地方。我可以以编程方式在某处创建聊天室并为该组的用户创建 id 吗?我是否需要托管自己的 XMPP 服务器(据我所知,该服务器不适用于 GAE)。
或者我只是当然完全没有更好的解决方案?
非常感谢您的帮助。
沃伦
I'm creating a mobile app that runs on iOS, Android, BB and Win7. It's a location-based app and you can join groups and then be able to see the location of other members of the group. That's all fine and good. I'm currently using GAE to manage the groups.
Now I'd like to add the ability for members of the group to chat with each other. No 1-1 IM but 1-many chat room. So when you've accessed a certain group in the app, you can type a message and all other members of that group will be able to see your message. I started down the road of mobile push (APNS, C2DM, etc) but thought there had to be a better way. I only want the messages coming in if the app is actually running anyway, so the important part of mobile push is not important in this case. But I of course don't want to poll either.
So I started looking into XMPP and it seems like the right solution, but I'm new to this technology. I don't want the user to have to already have, or create some online IM presence with some service of his choice. I'd like to just have a "Username" pref in the mobile app and that's all he ever needs to do.
So that's where I really need some help. Can I programatically create a chat room somewhere and ids for the users of the group? Would I need to host my own XMPP server (which I understand will not work with GAE).
Or am I just of course altogether than there's a better solution?
Thanks very much for any help.
Warren
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
我使用 QuickBlox.com 作为我的应用程序的后端。它内置了基于XMPP的聊天模块,还有一个消息模块,可以帮助您向iOS、Android和WP7发送跨平台推送。
顺便说一下,聊天模块支持 MUC(多用户聊天)中的群组,并且他们还有一个 示例 将聊天集成到我们的应用程序中。
I use QuickBlox.com as a back-end for my application. It has built-in Chat module based on XMPP and also a Messages module which can help you to send cross platform pushes to iOS, Android and WP7.
By the way, chat module supports groups in MUC (multi user chat) and they also have a sample to integrate the chat into our app.
检查 http://hosted.im/ 有免费计划(5 个用户)至少你可以测试一下。
关于XMPP实现,你可以做你想做的,但你需要运行你自己的xmpp服务器
服务器:
我不知道GAE是否支持扩展我在这里无法帮助你。
希望这能有所帮助。
Check http://hosted.im/ there is free plan (5 users) at least you can test it.
Regarding XMPP implementation, you can do what you want but you will need to run your own xmpp server
Servers:
I don't know if GAE support extension I can't help you here.
Hope this help a little bit.
即使这个问题有点老了,我认为这对其他技术人员很有用。:)
您可以使用 Quickblox 作为您的服务器,并在他们那里注册,他们为用户提供不同的计划,包括免费计划。
另外,如果您愿意,您可以维护自己的服务器。
aSmack 是用于在 Android 上实现 XMPP 的优秀库。您可以从 aSmack 站点获取 jar 和源代码。只需谷歌一下即可。
但根据我自己的经验,实现多用户聊天有点困难。
even the question is little bit old i think this will be useful for other techbees.. :)
You can use Quickblox as your server with registering with them they have different plans for users including free plans.
Also if you want you can maintain your own server.
aSmack is good library for implementing XMPP for android. You can get both the jar and source from the aSmack site. just google it.
But from my own experience its a little bit tough to implement the Multi user Chat..