Start Meeting ---- Non-login / API User


Contents

1. Start Meeting with Meeting Number

2. Start Meeting with Vanity ID

3. Start Meeting Status

After getting Zoom Token and Zoom Access Token, you can pass these tokens to start meetings with either meeting number or vanity ID.

1. Start Meeting with Meeting Number

If you would like to start a meeting with meeting number, firstly, you need to retrieve a MeetingService instance from ZoomSDK:

int ret = -1;
MeetingService meetingService = mZoomSDK.getMeetingService();
if(meetingService == null) {
    return ret;
}

Then configure StartMeetingOptions and prepare StartMeetingParamsWithoutLogin:

StartMeetingOptions opts =ZoomMeetingUISettingHelper.getMeetingOptions();

StartMeetingParamsWithoutLogin params = new StartMeetingParamsWithoutLogin();
StartMeetingOptions opts =ZoomMeetingUISettingHelper.getMeetingOptions();

StartMeetingParamsWithoutLogin params = new StartMeetingParamsWithoutLogin();

Store User ID,Zoom Token, Zoom Access Token, display Name, and meeting number in the StartMeetingParamsWithoutLogin instance, and start the meeting by calling startMeetingWithParams method:

APIUserInfo userInfo = APIUserInfoHelper.getAPIUserInfo();
if (userInfo != null) {
    params.userId = userInfo.userId;
    params.zoomToken = userInfo.userZoomToken;
    params.userType = STYPE;
    params.displayName = DISPLAY_NAME;
    params.zoomAccessToken = userInfo.userZoomAccessToken;
    params.meetingNo = meetingNo;
    ret = meetingService.startMeetingWithParams(context, params, opts);
    Log.i(TAG, "startMeetingWithNumber, ret=" + ret);
}
return ret;

2. Start Meeting with Vanity ID

Vanity ID

Vanity ID is a special and personalized ID that uniquely belongs to a user.

If you would like to start a meeting with vanity ID, the process is exactly the same as starting a meeting with meeting number, instead of storing meeting number inside the StartMeetingParamsWithoutLogin instance, store vanity ID in the instance.

int ret = -1;
MeetingService meetingService = mZoomSDK.getMeetingService();
if(meetingService == null) {
    return ret;
}

StartMeetingOptions opts = ZoomMeetingUISettingHelper.getMeetingOptions();

StartMeetingParamsWithoutLogin params = new StartMeetingParamsWithoutLogin();
APIUserInfo userInfo = APIUserInfoHelper.getAPIUserInfo();
if (userInfo != null) {
    params.userId = userInfo.userId;
    params.zoomToken = userInfo.userZoomToken;
    params.userType = STYPE;
    params.displayName = DISPLAY_NAME;
    params.zoomAccessToken = userInfo.userZoomAccessToken;
    params.vanityID = vanityId;
    ret = meetingService.startMeetingWithParams(context, params, opts);
    Log.i(TAG, "startMeetingWithVanityId, ret=" + ret);
}
return ret;

3. Start Meeting Status

To know whether the start meeting action is a success or not, or to get the error message, you need to implement the onMeetingStatusChange method:

@Override
public void onMeetingStatusChanged(MeetingStatus meetingStatus, int errorCode,
                   int internalErrorCode) {
  Log.i(TAG, "onMeetingStatusChanged, meetingStatus=" + meetingStatus + ", errorCode=" + errorCode
      + ", internalErrorCode=" + internalErrorCode);

  if(meetingStatus == MeetingStatus.MEETING_STATUS_FAILED && errorCode == MeetingError.MEETING_ERROR_CLIENT_INCOMPATIBLE) {
    Toast.makeText(this, "Version of ZoomSDK is too low!", Toast.LENGTH_LONG).show();
  }
}