0

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

String mNickName = "7799963";
String mGroupChatName = "room@confrence.mytestserver.net"; // 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?

Luciano Rodríguez
  • 2,239
  • 3
  • 19
  • 32
BST Kaal
  • 2,993
  • 6
  • 34
  • 52
  • Which implementation provides the MUC component? Also, which (a)Smack version are you using? – Flow Nov 23 '14 at 20:37
  • @Flow , i dnt understand wht u asked about MUC implementation. But I am using a jar "asmack-android-8.jar" – BST Kaal Nov 24 '14 at 04:38
  • @Flow, can u plz take a look at http://stackoverflow.com/questions/27125574/multiuserchat-addinvitationlistener-not-being-called – BST Kaal Nov 25 '14 at 11:34

1 Answers1

0
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("Kishan@54.76.159.35", "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.

Edi G.
  • 2,432
  • 7
  • 24
  • 33
Rajan Bhavsar
  • 1,977
  • 11
  • 25