Updated on 2023-03-23 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 to join a meeting in random mode. The meeting link (for example, https://bmeeting.huaweicloud.com/#/j/981924330/e11ddec62ee760734fcf2ba55b79937eac2aa68677caf659) in the notification email contains the meeting ID (981924330) and random code (e11ddec62ee760734fcf2ba55b79937eac2aa68677caf659).

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 Parameters

Parameter

Mandatory

Type

Description

joinConfParam

Yes

JoinConfParam

JoinConfParam object.

hwmCallback

Yes

HwmCancelableCallBack

Callback object.

Return Values

None

Parameter Extension

Table 2 JoinConfParam parameters

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

setRandom

Yes

String

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

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("987654321")        
          .setNickname("huawei123")        
          .setCameraOn(true)        
          .setMicOn(true);
} else {    
     joinConfParam = new PasswordJoinConfParam()        
          .setPassword(password)        
          .setConfId("987654321")        
          .setNickname("huawei123")        
          .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() {
        
    }
});