How to add user to which room is exist

this is my code:

public static void joinRoom(String userId, String roomId){

try {


sm.loginUser(userId, userId);

MultiUserChatManager mucm = MultiUserChatManager.getInstanceFor(sm.getConnection());

MultiUserChat muc = mucm.getMultiUserChat(roomId + “@” + SERVICE_ROOM_NAME + “.” + SERVICE_NAME);

muc.invite(userId + “@” + SERVICE_NAME, “”);


} catch (NotConnectedException e) {




but it just join room,not add a user to room!

i’m not want add user by invite listener!

becus the room just us can see!

There seems to be a method by the listener instead of user invitation

Who can tell me how to do

We can do this


Why no one answer?

Because it’s too easy?

This makes the novice how to live…

I’m just poor in English,And I think a lot of people like me can’t find this way.