AnsweredAssumed Answered

Add users into conference and auto join users

Question asked by rpotu on Dec 3, 2015

Hi,

I am trying to create a conference for a group of users and invite some specific users. I need to invite users and join them automatically without having them to accept the invitations.

Using the below code but it seems like there is no "accept invite" method just like we have a "decline invite" method. Is this intentional or no one would ever need to auto accept an invitation.

 

// Create the room.

            chatRoom = chatManager.createConferenceRoom("BusinessChat", (String)serviceNames.toArray()[0]);

            // Get the ChatRooms UI (This is the container for all ChatRooms)

            ChatContainer chatContainer = chatManager.getChatContainer();

 

I wrote up this listener but it seems like it never gets fired. am I missing something here? Or is there any spark client plugin available which can do this task?

 

// general invitation listener to accept any invite on any user

         chatManager.addInvitationListener(new RoomInvitationListener() {

 

  public boolean handleInvitation(XMPPConnection arg0, String arg1, String arg2, String arg3, String arg4,

  Message arg5) {

      // TODO Auto-generated method stub

     // MultiUserChat.

     Log.debug("Inside addInvitationListener method"); 

     // Log.debug(arg0.getConnectionID());

  return true;

    }

 

Is just returning "true" from the "handleInvitation" method enough to say that the user accepted the invite or not?

This is the only method available in MultiUserChatManager class. There is no equivalent "accept invite"

 

voiddecline(String room, String inviter, String reason)

Outcomes