Search code examples
androidtwiliotwilio-conversations

How can we display, select and add multiple participants at a time in the conversation using Twilio?


Our requirements are:

  1. To show all the available users (Not sure whether to call it Users or Participantsin terms of Twilio).
  2. To be able to select multiple users.
  3. To add multiple users to the group (Maybe, It is Conversations in Twilio).

Not exactly, but somewhat similar to the below screenshot:

enter image description here

I have already gone through:

Android Conversations SDK

But did not find a way to 1. List available users 2. Add multiple participants at a time.

I also found User Resource link:

Read Multiple Conversation User Resources but not really sure if there is any better way to achieve what we are looking for.


Solution

  • Twilio developer evangelist here.

    While there is a User object within the Conversations API, the objects are only created after a user in your application connects to a Conversations SDK (that is, you created an access token for them and they then successfully used that access token to connect to the Conversations Service within your application).

    I would recommend that you manage your application's users yourself within your app and list them from your own store of them.

    There is, as far as I can see, no way to add more than one participant to a conversation at a time. You will need to loop through the users you want to add as participants and add them each individually.