Developing a Chat APP Group function using MucLight XEP with smack library ,the problem is I m able to send the message to group successfully but when its come to message listening I get confused,in smack library we have
multiUserChatLight.addMessageListener (new MessageListener ( ) {
@Override
public void processMessage(Message message) {
}
});
But its group Specific listener , means Its only listen to multiuserchatlight reference group, which some how not what I need,because every time whenever I reconnected with the chat server I need to register this listener against every group in which I involved , which is not good in opinion .
the other approach is to register packetlistener
which is also little problematic with some cases like as member of group I received the message which I send into the group ,
So there is any alternative?
Can some one tell me where i am wrong ?
whenever you connected with server and authenticated you need to register always message listener. i have done using StanzaListener to add MucLight listener.
registerMessageListener register when you have authenticated with server.