powered by Jive Software

Reconnection and MultiUserChat


I am using Smack library with a Spark client and I have found that after successful reconnections, every time I use the function *getOccupantsCount() *from a joined *MultiUserChat, *it gives me size 0 and I can’t either use getOccupants() because it is always empty. It happens when I start a new conference and when I am invited to one, and being joined to the room in both cases.

Anyone knows how can I retreive normal behavior of MultiUserChat variables after a successful reconnection? I can only achieve it login out my application.

Any idea?

Thanks in advance.

first :login and setupConnesetupctionLinstener


_xmppConnection.addConnectionListener(onConnection) ;

… create multiUserChat room and join room


second: realization onConnection

ConnectionListener onConnection = new ConnectionListener(){

public void connectionClosed(){

//again login at this segment




public void reconnectionSuccessful(){





at this,you can restart openfire and you see, user logined and multiUserChat joined you define room now !!