I am building a chat app and I have problem with the MultiUserChat class. The library I am using is downloaded from the google codes.
After the XMPP connectoin is lost, I am automatically leaving all my joined groups
After the reconnection I am trying to use :
MultiUserChat.getJoinedRooms(xmpp, "1@test.server.com");
so I can all my joined rooms, but I get a NullPointerException.
Anyone have an idea how can rejoined all my joined rooms before I was disconnected?
I thought about storing all my joined in database and then re-joined it after selecting them. Any other idea?
Kamal is right.
getJoinedRooms()only returns with a list of rooms if you are connected and joined to some MUC instances. I also recommend to store the MUC JIDs into a database (or just in memory) and rejoin the rooms after a reconnection. We do the same on GTalkSMS.