Invite Users

Invite a Single User

To invite a user to join a channel:

VoiceLayerChannelInvitation invitation = channel.inviteUser(user);

or

channel.inviteUser(user, new VoiceLayerChannelInvitationCallback() {

    @Override
    public void onChannelInvitationCompleted(List<VoiceLayerChannelInvitation> invitations, VoiceLayerException exception) {

    }

});

Invite Multiple Users

First create a list of users to invite:

List<VoiceLayerUser> users = new ArrayList<>();
users.add(user);
users.add(user2);

then invite the users to the join the channel:

List<VoiceLayerChannelInvitation> invitations = channel.inviteUsers(users);

or

channel.inviteUsers(users, new VoiceLayerChannelInvitationCallback() {

    @Override
    public void onChannelInvitationCompleted(List<VoiceLayerChannelInvitation> invitations, VoiceLayerException exception) {

    }

});