Browse SDKs · Android
Platform
SDKsAndroidEnterprise

Start a group call

Initiate a group audio or video call and acquire room credentials using signalingInviteInGroup().

Copy

Initiate a group audio or video call within a group conversation. The parameter models match those of Start a single call, except invitation.groupID requires a valid group ID and invitation.sessionType is set to ConversationType.GROUP_CHAT.

Only group members explicitly specified in inviteeUserIDList receive invitations; providing a groupID does not automatically ring all members of the group. Exclude the current user ID, empty values, and duplicates from inviteeUserIDList. In the example below, the group ID is reused as the room ID; if you generate custom roomID values, ensure all participants join the same identifier.

Code example

SignalingInvitationInfo invitation = new SignalingInvitationInfo();
invitation.setInviterUserID(currentUserID);
invitation.setInviteeUserIDList(selectedGroupMemberIDs);
invitation.setGroupID(groupID);
invitation.setRoomID(groupID);
invitation.setTimeout(30);
invitation.setMediaType("video");
invitation.setSessionType(ConversationType.GROUP_CHAT);
invitation.setPlatformID(Platform.ANDROID);
invitation.setCustomData("{\"source\":\"group-call\"}");

SignalingInfo info = new SignalingInfo();
info.setInvitation(invitation);
info.setOfflinePushInfo(offlinePushInfo);

OpenIMClient.getInstance().signalingManager.signalingInviteInGroup(
    new OnBase<SignalingCertificate>() {
        @Override
        public void onSuccess(SignalingCertificate credentials) {
            // credentials contains room token and liveURL to join the media room.
        }

        @Override
        public void onError(int code, String error) {
            // code and error describe the failure.
        }
    },
    info
);

Parameters

ParameterTypeRequiredDescription
baseOnBase<SignalingCertificate>YesCallback delivering room credentials needed to connect to the media engine.
infoSignalingInfoYesComplete signaling payload containing group ID, invitee list, room ID, and media type.

Invitation attributes

FieldTypeDescription
inviterUserIDStringInitiator user ID (authenticated user).
inviteeUserIDListList<String>List of invited member user IDs, excluding the caller and deduplicated. Populating groupID does not automatically invite all group members.
groupIDStringTarget group ID for the group call.
roomIDStringCall room identifier, such as the groupID or a random UUID.
timeoutintInvitation timeout in seconds.
mediaTypeStringMedia type string, such as "audio" or "video".
sessionTypeintSession type; set to ConversationType.GROUP_CHAT for group calls.

Return value

Upon success, credentials in onSuccess returns a SignalingCertificate object containing:

  • roomID: Unique global identifier of the call room.
  • token: Authentication token used to join the media room.
  • liveURL: Media server endpoint URL.
  • busyLineUserIDList: List of invited members currently engaged in another call.

State changes after the call

  1. Callback confirmation: The onSuccess callback confirms that the signaling request succeeded and room credentials were acquired. It does not indicate that invited group members have answered or connected to the media engine.
  2. Asynchronous event delivery: The initiator and invited members track subsequent call events through OnSignalingListener. Track the group call room state using roomID and track individual member response and connectivity states using roomID:userID.
  3. Media connection: Connect to the real-time audio/video engine using the returned token and roomID. For real-time event updates, see Handle call events.