我正在使用asmack库在android中进行小组聊天。我可以与单一用户聊天,但在小组聊天中遇到问题。我需要任何教程或代码来执行小组聊天。
在寻找解决方案时,我参考了这个堆栈溢出问题和这篇博客文章。
发布于 2014-04-07 11:30:39
public void MUC_Configure(String roomname){
try{
muc = new MultiUserChat(XMPPSmackConnection.connection, roomname+Constant._hostNameWithCONF);
muc.create("nickname1");
// Send an empty room configuration form which indicates that we want an instant room
muc.sendConfigurationForm(new Form(Form.TYPE_SUBMIT));
muc.join("nickname1");
muc.invite("column1"+Constant._hostNameWithAt+"/Smack", "Meet me in this excellent room");
muc.addInvitationRejectionListener(this);
muc.addMessageListener(this);
}catch (Exception e) {
e.printStackTrace();
}
}最后,我完成了上述方法。
https://stackoverflow.com/questions/22602907
复制相似问题