multi user chat in smack
I am a new user of SMACK chat API. I am trying to write a multi user chat application but not able to do it. Can anyone give me simple full version of code for this.
Here is my code
ConnectionConfiguration config = new ConnectionConfiguration("127.0.0.1",5222);
connection = new XMPPConnection(config);
connection.connect();
connection.开发者_如何学JAVAlogin("aa", "bb");
MultiUserChat muc = new MultiUserChat(connection, "test@testdomain");
muc.join("nick");
One thing I notice about your code is that you do not add a message listener anywhere. Your code will not be notified of new messages unless you call something like muc.addMessageListener(...
精彩评论