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

Joining a Meeting

1
HWMSdk.getOpenApi.joinConf(JoinConfParam, HwmCancelableCallBack)

API Description

This API can be used to join a meeting regardless of whether you have logged in or not. You can join a meeting in either of the following ways:

  • Enter the meeting ID and password.
  • Use a meeting ID and random code to join the meeting. The meeting link (for example, https://meeting.huaweicloud.com/#/j/981924330/e**********************************************9) in the notification email contains the meeting ID (981924330 in this example) and random code (e**********************************************9 in this example).

Precautions

  • If you call this API without logging in to Huawei Cloud Meeting, the nickname parameter must be specified.
  • Call the child class PasswordJoinConfParam to join a meeting using the ID, and call the child class RandomJoinConfParam to join a meeting in random mode.

Method Definition

1
2
3
4
5
   /**
     * @param joinConfParam Indicates the joinConfParam object.
     * @param hwmCallback Indicates the result callback.
     */
     void joinConf(JoinConfParam joinConfParam, HwmCancelableCallBack<Void> hwmCallback);

Parameter Description

Table 1 Parameter description

Parameter

Mandatory

Type

Description

joinConfParam

Yes

JoinConfParam

JoinConfParam object.

hwmCallback

Yes

HwmCancelableCallBack

Callback object.

Return Values

None

Parameter Extension

Table 2 JoinConfParam description

Parameter

Mandatory

Type

Description

setConfId

Yes

String

Meeting ID.

setNickname

Yes

String

Nickname.

setCameraOn

No

boolean

Whether to enable the camera.

setMicOn

No

boolean

Whether to enable the microphone.

Table 3 PasswordJoinConfParam parameter

Parameter

Mandatory

Type

Description

password

No

String

Password for joining the meeting. This parameter is left blank if the meeting does not have a password.

isStopConflictConf

No

boolean

Whether to forcibly end the meeting that conflicts with the cloud meeting room.

Table 4 RandomJoinConfParam parameter

Parameter

Mandatory

Type

Description

random

Yes

String

Random number for joining the meeting, which is generated based on the meeting password.

domain

No

String

Domain name, which is used when you join the meeting offline.

Sample Code
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
JoinConfParam joinConfParam;
if (!TextUtils.isEmpty(random)) {    
     joinConfParam = new RandomJoinConfParam()        
          .setRandom(random)        
          .setConfId(getConfId())        
          .setNickname(getNickname())        
          .setCameraOn(true)        
          .setMicOn(true);
} else {    
     joinConfParam = new PasswordJoinConfParam()        
          .setPassword(password)        
          .setConfId(getConfId())        
          .setNickname(getNickname())        
          .setCameraOn(true)        
          .setMicOn(true);
}
HWMSdk.getOpenApi(getActivity()).joinConf(joinConfParam, new HwmCancelableCallBack<Void>() {       
      
     // Callback invoked when joining the meeting is successful.
     @Override             
     public void onSuccess(Void ret) {                 
         Log.i(TAG, "Meeting joined");
     }       
       
     // Callback invoked when joining the meeting fails.
     @Override             
     public void onFailed(int retCode, String desc) {                 
         String err = ErrorMessageFactory.create(Utils.getApp(), retCode);                 
         if (TextUtils.isEmpty(err)) {                     
             err = Utils.getApp().getString(com.huawei.hwmmobileconfui.R.string.conf_join_fail_tip);                 
         }                 
         Log.e(TAG, "Joining the meeting failed: "+ err);
     }    
    @Override
    public void onCancel() {
        
    }
});