powered by Jive Software

How send messages and get

Now I can connect 2 users in a room, but I don’t know how get and send message,

where send and get messages normals in a room ?

http://www.igniterealtime.org/builds/smack/docs/latest/documentation/extensions/ muc.html

I’m a new, used muc.

Not exist a

AddListener - > send / get - > ¿¿??

Can someone help me on this?

you should send something like this

  1. This is a message

I talk about muc java …

I have problem …

test1

muc2 = new MultiUserChat(connection, roomId);

muc2.join(userr);

muc2.invite(“test2”, “Welcome!”);

sendChatMessage(“hola sóc l’usuari 1”);

receiveMessage();

test2

muc2 = new MultiUserChat(connection, roomId);

muc2.join(userr);

muc2.invite(“test1”, “Welcome!”);

sendChatMessage(“hola sóc l’usuari 2”);

receiveMessage();

Without muc.sendConfigurationForm(new Form(Form.TYPE_SUBMIT));

recipient-unavailable(404)

but if 2 implements sendConfigurationForm

forbidden(403)

I need same code for 2, is a Android.

I think your problem is different because you are getting a message error from xmpp server.

Do you have any log?

btw you need to send the configuration form after you create the room.

You should have something like this:

This room is locked from entry until configuration is confirmed.

When you send the configuration form:

This room is now unlocked.

how are you creating the room ?

Users.class

test1

muc = new MultiUserChat(connection, roomId);

muc.join(userr);

muc.invite(“test2”, “Welcome!”);

muc.sendConfigurationForm(new Form(Form.TYPE_SUBMIT));

sendChatMessage(“hola sóc l’usuari 1”);

receiveMessage();

test2

muc2 = new MultiUserChat(connection, roomId);

muc2.join(userr);

muc2.invite(“test1”, “Welcome!”);

sendChatMessage(“hola sóc l’usuari 2”);

receiveMessage();

WORKS CORRECTLY,

  • if user 1 sendConfigurationForm, = work, works correctly

  • if user 1 and user 2 sendConfigurationForm = forbidden(403)

*This is a aquestion : *

but in a aplication ANDROID, I execute a java the same java, for all users, How can sendConfiguration for not appear forbidden(403)

  • ****The methos send receive : anothers

plz paste all the xml stanzas.

maybe your problem is a bad use of variables. It’s easier if you paste the stanzas

Daniel Goldberg escribió:

plz paste all the xml stanzas.

maybe your problem is a bad use of variables. It’s easier if you paste the stanzas

Where xml ? for configurate lines ? sry my ignorance

I need LDAP? I remake my configure my server

Put this line before the creation of the connection.

Connection.DEBUG_ENABLED = true;

Then copy all the xml exchange

Solved, I understand, the library smack (is encripted) have xml, that connect with my host (my pc)

If I need modify xml, I need make my propy library (is easy)