I am trying to implement a code that enables users to create multi user chat rooms on my Android application.
I am using following code to create a new MUC room.
MultiUserChat mucx = new MultiUserChat(connection, roomName + "@" + serviceName);
try {
mucx.create(nickName);
} catch (XMPPException e) {
Log.e(TAG, "Error on MultiUserChat.create ", e);
return false;
}
Form f = new Form(Form.TYPE_SUBMIT);
try {
mucx.sendConfigurationForm(f);
} catch (XMPPException xe) {
Log.e(TAG, "Error on sendConfigurationForm", xe);
}
When the MultiUserChat.create() method is called, a presence info is sent to the new room and a presence packet is received from the server as follows.
D/SMACK(17765): 05:03:40 PM SENT (1096879600): <presence id="15E9y-5" to="ankara@conference.jabber.hot-chilli.net/fahrettin"><x xmlns="http://jabber.org/protocol/muc"></x></presence>
D/SMACK(17765): 05:03:40 PM RCV (1096879600): <presence from='ankara@conference.jabber.hot-chilli.net/fahrettin' to='fahrettin@wtfismyip.com/home' id='15E9y-5'><x xmlns='http://jabber.org/protocol/muc#user'><item jid='fahrettin@wtfismyip.com/home' affiliation='owner' role='moderator'/><status code='110'/></x></presence>
After that, Smack sends a presence of type unavaiable and throws an exception with message "Creation failed - Missing acknowledge of room creation"
D/SMACK(17765): 05:03:40 PM SENT (1096879600): <presence id="15E9y-6" to="ankara_comfiratdulgergoroom@conference.jabber.hot-chilli.net/fahrettin" type="unavailable"></presence>
E/XMPPManager(17765): Error on MultiUserChat.create
E/XMPPManager(17765): Creation failed - Missing acknowledge of room creation.:
E/XMPPManager(17765): at org.jivesoftware.smackx.muc.MultiUserChat.create(MultiUserChat.java:379)
Looking at the source code, it seems that this error is given when the room already exists. But I am sure that the room does not exists, since I check the room list each time. I also tried the same code with other public xmpp servers but no change. So what can be the reason for this error?
Thanks