Search code examples
javaandroidchatopenfireasmack

Get the Chat Room List from the Openfire Sever USING Asmack


Any body know how to get the chat room list from openfireServer using Asmack library .Help me .

Thanks


Solution

  • Use this to get list of room names that the user has joined:

    Iterator roomsJoinedByUser = MultiUserChat.getJoinedRooms(connection, "[email protected]");
    

    Use this to get list all hosted rooms:

    Collection<HostedRoom> rooms = MultiUserChat.getHostedRooms(connection, "service_name");