"No Response From Server." For MutliUserChat in android

453 views Asked by At

I am trying to create a room for MultiUserChat in android. Here is my attempt:

String mNickName = "7799963";
String mGroupChatName = "[email protected]"; // Room Name
MultiUserChat mMultiUserChat;

mMultiUserChat = new MultiUserChat(mXMPPConnection, mGroupChatName);
try {

    mMultiUserChat.create(mNickName);
    mMultiUserChat.sendConfigurationForm(new Form(Form.TYPE_SUBMIT));
    mMultiUserChat.join(mNickName);
} catch (XMPPException e) {

    e.printStackTrace();
}

But i am getting no response , here is my logcat:

11-23 15:58:54.580: W/System.err(16749): No response from server.: 
11-23 15:58:54.610: W/System.err(16749):    at org.jivesoftware.smackx.muc.MultiUserChat.create(MultiUserChat.java:359)

Can anyone guide me where m mistaken or any solution?

1

There are 1 answers

0
Rajan Bhavsar On
final MultiUserChat muc = new MultiUserChat(connection, roomsName+ "@conference." + connection.getServiceName());    

// The number of chat room services will decide to accept the
// historical record
// muc.create(roomsName);

DiscussionHistory history = new DiscussionHistory();
history.setMaxStanzas(0);
// history.setSince(new Date());
// Users to join in the chat room
// if (user.equals("meet")) {
// muc.invite("[email protected]", "Invitation From Rajan");
muc.join(user, password, history,
    SmackConfiguration.getPacketReplyTimeout());

In this code You have to add your:

  1. connection instance.
  2. custom RoomName.

I am able to create Group in open Fire.