I am facing issue while creating chat group using XMPP(4.1.3).
My code is
try{
// Get the MultiUserChatManager
MultiUserChatManager manager = MultiUserChatManager.getInstanceFor(ClosrrService.xmppConnection);
Log.e("Connection : ", ClosrrService.xmppConnection.toString());
// Get a MultiUserChat using MultiUserChatManager
MultiUserChat muc = manager.getMultiUserChat("dayaroom@conference."+Constants.HOST);
// Create the room and send an empty configuration form to make this an instant room
muc.create("testbotdaya");
muc.sendConfigurationForm(new Form(DataForm.Type.submit));
}catch (Exception e) {
e.printStackTrace();
}
In above code I am getting exception on muc.create("testbotdaya");
and exception is
org.jivesoftware.smack.XMPPException$XMPPErrorException: XMPPError: service-unavailable - cancel
W/System.err﹕ at org.jivesoftware.smack.PacketCollector.nextResultOrThrow(PacketCollector.java:232)
W/System.err﹕ at org.jivesoftware.smackx.muc.MultiUserChat.enter(MultiUserChat.java:311)
W/System.err﹕ at org.jivesoftware.smackx.muc.MultiUserChat.createOrJoin(MultiUserChat.java:400)
at org.jivesoftware.smackx.muc.MultiUserChat.createOrJoin(MultiUserChat.java:376)
W/System.err﹕ at org.jivesoftware.smackx.muc.MultiUserChat.create(MultiUserChat.java:354)
W/System.err﹕ at com.rappier.closrr.chat.grpupchat.CreateGroupActivity.createGroup(CreateGroupActivity.java:82)
W/System.err﹕ at com.rappier.closrr.chat.grpupchat.CreateGroupActivity.onClick(CreateGroupActivity.java:64)
Please help me. Thanking in advance.