如何使用smack 4.1

时间:2016-08-26 10:17:32

标签: android xmpp smack chatroom

这就是我正在做的事情: - 登录后尝试加入群组。

connection.login(userDate.getUserId(),userDate.getUserPassword());

登录****后

****

 String groupName =
            XmppUtils.buildMUCName(results.get(i).getGroupName().trim());
                            MultiUserChat multiUserChat = managerMuc.getMultiUserChat(groupName);
                            try {

                                if (!multiUserChat.isJoined()) {
                                    multiUserChat.join(userId);
                                } } catch (SmackException.NoResponseException e) {
                            e.printStackTrace();
                        } catch (XMPPException.XMPPErrorException e) {
                            e.printStackTrace();
                        } catch (SmackException.NotConnectedException e) {
                            e.printStackTrace();
                        } catch (SmackException e) {
                            e.printStackTrace();
                        }

1 个答案:

答案 0 :(得分:1)

 var collection = db.collection('mycollection')
 collection.find({name: 'modulus user', roles:  'user'}).toArray(...