Updated on 2024-07-30 GMT+08:00

Adding Participants

1
HWMBizSdk.getBizOpenApi().addAttendee(List<AttendeeModel> attendees, HwmCallback<Integer> hwmCallback);

API Description

This API is used to invite participants to a meeting.

Precautions

  1. Only the host can invite participants.

Method Definition

1
2
3
4
5
6
    /**
     * Invites participants to a meeting.
     * @param attendees Indicates the participants to invite.
     * @param hwmCallback Indicates the result callback.
     */
    void addAttendee(List<AttendeeModel> attendees, HwmCallback<Integer> hwmCallback);

Parameter Description

Table 1 AttendeeModel description

Parameter

Mandatory

Type

Description

name

Yes

String

Participant name.

number

Yes

String

Number. If this parameter is set to the SIP number (for example, +99111244216210249) allocated to the account, the Huawei Cloud Meeting app is called. If this parameter is set to a PSTN number (for example, 18700000000), the number is called through the VoIP gateway if the enterprise has enabled PSTN call. This parameter is used for account and password authentication. Either this parameter or thirdUserId must be set.

thirdUserId

Yes

String

Third-party user ID. This parameter is used for app ID authentication. Either this parameter or number must be set.

Sample Code
HWMBizSdk.getBizOpenApi().addAttendee(List<AttendeeModel> attendees, new HwmCallback<Integer>() {
    @Override
    public void onSuccess(Integer integer) {
        Log.i(TAG, "Participants added.");
    }

    @Override
    public void onFailed(int retCode, String desc) {
        Log.i(TAG, "Failed to add the participants. code: " + retCode);
    }
});