Unable to return group list in xmpp with asmack version asmack-android-8-4.0.6.jar

515 views Asked by At

I am unable to get group list with asmack version asmack-android-8-4.0.6.jar from XMPP I tried all the possible methods to get group names from xmpp,I was able to get in Pidjin clinet but not able to get using asmack,here is the code am using to get groups list

Collection<RosterGroup> entriesGroup = roster.getGroups();
List<String> joinedRooms = MultiUserChat.getJoinedRooms(DataManager.xmppConnection,DataManager.xmppConnection.getUser());
1

There are 1 answers

0
kondal On
List<String> serviceNames = (List<String>) MultiUserChat.getServiceNames(DataManager.xmppConnection);
                for (String servcieName : serviceNames) {
                    Log.i(TAG,"Servcie name "+servcieName);
                }
                //List<String> joinedRooms = MultiUserChat.getJoinedRooms(DataManager.xmppConnection, DataManager.xmppConnection.getUser());
                List<HostedRoom> hostedRooms = (List<HostedRoom>) MultiUserChat.getHostedRooms(DataManager.xmppConnection, serviceNames.get(0));

above code got worked to get group names from xmpp,very bad that smack doesn't have good support