powered by Jive Software

MultiUserChat Error creating a room

i’m a french student currently developping an android application using the great smack library.

I have managed to do a lot of things, but i can’t create a chatroom that other users can join.

In fact, i create a chatroom using :

mChatRoom = new MultiUserChat(mChat.getConnection(), username + “@conference.drawparty”);

mChatRoom.create(username);

It creates me a chatroom on my openfire server, but i can’t connect to it using any client (such as Spark or my android client).

I found that i had to use a form, so that’s what i did :

Form form = mChatRoom.getConfigurationForm();

Form submitForm = form.createAnswerForm();
for (Iterator fields = form.getFields(); fields.hasNext():wink: {
FormField field = (FormField) fields.next();
if (!FormField.TYPE_HIDDEN.equals(field.getType()) && field.getVariable() != null) {
submitForm.setDefaultAnswer(field.getVariable());
}
}

// Set that the room requires a password
submitForm.setAnswer(“muc#roominfo_description”, “describe”);
// Set the password for the room
submitForm.setAnswer(“muc#roomconfig_persistentroom”, true);
// Set the public login
submitForm.setAnswer(“muc#roomconfig_enablelogging”, true);

mChatRoom.sendConfigurationForm(submitForm);

But that doesn’t change a thing…

Even when i go into the openservice administration panel, i can see my room (as usual), but there is not the description “describe”, nor the room is persistent…

If you can help me with that, that would be really greatfull !

Thank you in advance and have a nice day !

Yohan HADJEDJ,

In fact, in eclipse, i got a warning with :

not-authorized(401) while using MultiUserChat.getConfigurationForm

It seems i’m not allowed to retrieve the Form.

Can anybody help plz ?

Thanks !