啪 - 当调用MultiUserChat.Join(...) [英] Smack - When to call MultiUserChat.Join(...)

查看:630
本文介绍了啪 - 当调用MultiUserChat.Join(...)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有点迷茫,找不到在的文档
我正在开发Android一个简单的聊天应用程序。
我创建了一个组(MUC),一切工作,但我必须保持调用join()每次我打开应用程序?

I'm a bit confused and can't find the answer in the docs. I'm developing a simple chat app for Android. I've created a group (muc) and everything works, but do I have to keep calling join() everytime I open the app?

我注意到,它并没有其他工作..
不明白为什么,因为服务器知道我JABBERID连接到该睦

I've noticed that it doesn't work otherwise.. Don't understand why since the server knows that my jabberID is connected to this muc.

希望我的问题是非常明显的。谢谢你。

Hope my question is clear enough. Thanks.

推荐答案

A(我希望)完整的解释:简短的答案是肯定的。

A (I Hope) complete explanation: short answer is yes.

在您的服务器上创建一个持久房间,您注销或退出房间,你必须每次都重新加入。
注销或连接丢失是显而易见的,但是当你退出(假)的房间,你也不会直接从中接收消息(即使你仍连接到服务器),服务器知道你的id是的关联与MUC(例如作为成员),但你不是它,进一步信息请参考的有关MUC ,也是XEP阅读有关特定服务器如何实现它在你的服务器上的文档(可能节省的消息下房间到脱机用户,或者类似的东西)。

When a persistent room is created on your server, and you logout or exit the room, you have to re-join each time. A logout or connection lose is obvious, but when you exit (leave) the room, you also won't receive messages directly from it (even though your still connected to the server), the server knows your id is affiliated with that MUC (as a member for example), but you're not inside it, for further info refer to the XEP about MUC, and also read about how your specific server implements it on your server docs (probably saves messages under a room-to-offline users, or something similar).

这基本上就是发生在WhatsApp的,当你进出群聊的,但他们也有自己的定制方式来让你知道未读邮件(它们建立在基本的XMPP服务器之上的层),即包括两个服务(你可以看到它在你的手机在一般设置 - >应用程序)推送通知。

That is basically what happens in WhatsApp when you go in and out of group chats, but they also have their own custom way (the layer they built on top of the basic xmpp server) to let you know about unread messages, that includes both a service (you can see it in your phone in the general settings->apps) and push notifications.

这篇关于啪 - 当调用MultiUserChat.Join(...)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆