How to work with custom UI

I’ve added a MobileRTCVideoView to my custom XML layout, but not sure how to fill it with a meeting being joined.

Hey @jagruti

Thanks for posting on the Zoom Devforum! I am still learning, but I will try my best to help answer your question. :slightly_smiling_face:

Checkout this related thread that may have the answer you are looking for:

If this thread did not help, please let us know by replying back here and someone from the Developer Relations team will get back to you shortly.

Thanks,
DeveloperBot

I want to customize whole UI in my existing app

Hi @jagruti, thanks for using the Zoom SDK!

It sounds like you’re looking for the customized meeting UI docs. If you run into trouble while implementing your meeting UI, the sample app linked in the thread referenced above may be a useful point of reference. Hope this helps. :slightly_smiling_face:

Thanks!

Thanks It’s working.

One more thing need to know how can I start webinar from android sdk? Currently If I am starting the webinar from zoom application or web portal at that time I am able to join webinar without login. But if I will start the webinar from Zoom android sdk application I am not able to join the webinar as it’s showing wait till host start the webinar.

Hi @jagruti, glad to hear the customized UI is working!

As far as starting a webinar as host goes, you should be able to do this through the SDK as a logged in user. Joining the webinar without logging in will not allow you to start it as the host because authentication is required. Please reference our authentication and start meeting documentation for more info.

Thanks!

Hi Jon,

At the time of start the webinar I am logged in with one licensed user at the other side other users can join that webinar without login or not? As in my current requirement we want to join webinar without login.

What happens currently When I am starting the webinar with Sign In | Zoom web portal I am able to join webinar from android SDK. But if I am starting same webinar from Android SDK with logged in by same credentials which I have used for web portal, I am able to start the webinar from SDK but other side in other device with Android SDK when I am trying to join that webinar It will always show me waiting room but in actual case webinar is started from Android SDK. Same thing is working properly if I start webinar from portal. Please help me for the same.

Thanks!

@jagruti, thanks for the response.

You may be able to join a webinar without authenticating, depending on the settings for your webinar.

As for starting a webinar, can you please provide a code snippet showing how you’re trying to start the webinar as the host?

Thanks!

Hi Jon,
I have used below code from SDK to start the webinar.

public void onClickBtnStartMeeting(View view) {
    String meetingNo = mEdtMeetingNo.getText().toString().trim();

    if (meetingNo.length() == 0 ) {
        Toast.makeText(this, "You need to enter a meeting number/ vanity  which you want to join.", Toast.LENGTH_LONG).show();
        return;
    }

    ZoomSDK zoomSDK = ZoomSDK.getInstance();
    if (!zoomSDK.isInitialized()) {
        Toast.makeText(this, "ZoomSDK has not been initialized successfully", Toast.LENGTH_LONG).show();
        return;
    }

    final MeetingService meetingService = zoomSDK.getMeetingService();
    if (meetingService.getMeetingStatus() != MeetingStatus.MEETING_STATUS_IDLE) {
        long lMeetingNo = 0;
        try {
            lMeetingNo = Long.parseLong(meetingNo);
        } catch (NumberFormatException e) {
            Toast.makeText(this, "Invalid meeting number: " + meetingNo, Toast.LENGTH_LONG).show();
            return;
        }

        if (meetingService.getCurrentRtcMeetingNumber() == lMeetingNo) {
            meetingService.returnToMeeting(this);
            return;
        }

        new AlertDialog.Builder(this)
                .setMessage("Do you want to leave current meeting and start another?")
                .setPositiveButton("Yes", new DialogInterface.OnClickListener() {

                    @Override
                    public void onClick(DialogInterface dialog, int which) {
                        mbPendingStartMeeting = true;
                        meetingService.leaveCurrentMeeting(false);
                    }
                })
                .setNegativeButton("No", new DialogInterface.OnClickListener() {

                    @Override
                    public void onClick(DialogInterface dialog, int which) {

                    }
                })
                .show();
        return;
    }

    int ret = -1;
    ret = LoginUserStartMeetingHelper.getInstance().startMeetingWithNumber(this, meetingNo);
    Log.i(TAG, "onClickBtnStartMeeting, ret=" + ret);
}

public int startMeetingWithNumber(Context context, String meetingNo) {
int ret = -1;
MeetingService meetingService = mZoomSDK.getMeetingService();
if(meetingService == null) {
return ret;
}

    StartMeetingOptions opts =ZoomMeetingUISettingHelper.getStartMeetingOptions();
    opts.no_video=false;

    StartMeetingParams4NormalUser params = new StartMeetingParams4NormalUser();
    params.meetingNo = meetingNo;
    return meetingService.startMeetingWithParams(context, params, opts);
}

To join meeting use below code:
public void onClickJoin(View view) {
if(!mZoomSDK.isInitialized())
{
Toast.makeText(this,“Init SDK First”,Toast.LENGTH_SHORT).show();
InitAuthSDKHelper.getInstance().initSDK(this, this);
return;
}

    if (ZoomSDK.getInstance().getMeetingSettingsHelper().isCustomizedMeetingUIEnabled()) {
        ZoomSDK.getInstance().getSmsService().enableZoomAuthRealNameMeetingUIShown(false);
    } else {
        ZoomSDK.getInstance().getSmsService().enableZoomAuthRealNameMeetingUIShown(true);
    }
    String number = numberEdit.getText().toString();
    String name = nameEdit.getText().toString();

    JoinMeetingParams params = new JoinMeetingParams();
    params.meetingNo = number;
    params.displayName = name;
    params.password = "0";
    params.displayName = "Test Zoom";
    JoinMeetingOptions options=new JoinMeetingOptions();
    ZoomSDK.getInstance().getMeetingService().joinMeetingWithParams(this, params,ZoomMeetingUISettingHelper.getJoinMeetingOptions());
}

Thanks!

@jagruti, thanks for providing that! Calling into startMeetingWithParams should be starting the webinar if you’re providing the required info and I’m not seeing any issues around that.

Have you made any changes to the LoginUserStartMeetingHelper from the sample app or are you using it as-is? Additionally, logs from a session where you are unsuccessful in starting a webinar would be useful.

Thanks!

Hi Jon,

I have not done any changes in LoginUserStartMeetingHelper file. I have used it provided in SDK demo.

My issue is with join webinar not with start the webinar as I said before when I am starting the webinar from the zoom desktop app or web portal It will allow me to join webinar without login from other device but if I am starting the webinar from the android SDK demo using methods provided in above discussion will always show me waiting room meeting status is MeetingStatus.MEETING_STATUS_WAITINGFORHOST.
Following are some logs after start meeting:

2020-08-28 09:30:03.878 8601-8601/us.zoom.sdkexample I/InitAuthSDKHelper: onZoomSDKInitializeResult, errorCode=0, internalErrorCode=0
2020-08-28 09:30:03.878 8601-8601/us.zoom.sdkexample I/ZoomSDKExample: onZoomSDKInitializeResult, errorCode=0, internalErrorCode=0
2020-08-28 09:30:08.915 9779-9779/us.zoom.sdkexample I/ZoomSDKExample: onMeetingStatusChanged, meetingStatus=MEETING_STATUS_CONNECTING, errorCode=0, internalErrorCode=0
2020-08-28 09:30:46.471 9779-9779/us.zoom.sdkexample D/MeetingVideoCallback: onMeetingActiveVideo:16778240
2020-08-28 09:30:46.474 9779-9779/us.zoom.sdkexample D/MeetingVideoCallback: onMeetingActiveVideo:16778240
2020-08-28 09:30:46.476 9779-9779/us.zoom.sdkexample D/MeetingVideoCallback: onMeetingActiveVideo:16778240
2020-08-28 09:30:46.477 9779-9779/us.zoom.sdkexample I/chatty: uid=10283(us.zoom.sdkexample) identical 1 line
2020-08-28 09:30:46.477 9779-9779/us.zoom.sdkexample D/MeetingVideoCallback: onMeetingActiveVideo:16778240
2020-08-28 09:30:46.483 9779-9779/us.zoom.sdkexample I/ZoomSDKExample: onMeetingStatusChanged, meetingStatus=MEETING_STATUS_INMEETING, errorCode=0, internalErrorCode=0

Following are some logs when joining the webinar:
2020-08-28 09:32:21.496 23369-23369/us.zoom.sdkexample I/MeetingService: joinMeetingWithParams: sUri=zoomus://zoom.us/join?confno=84467757834&uname=Test+Zoom&pwd=0&show_water_mark=1&meeting_views_options=0&invite_options=255&zc=0
2020-08-28 09:32:22.133 23369-23369/us.zoom.sdkexample D/ZoomSDKExample: onMeetingStatusChanged MEETING_STATUS_CONNECTING:0
2020-08-28 09:32:22.372 23369-23369/us.zoom.sdkexample I/MobileRTCVideoView: surfaceCreated group index =194751866
2020-08-28 09:32:22.386 23369-24530/us.zoom.sdkexample I/MobileRTCVideoView: onGLSurfaceChanged group index =194751866, width=1080, height=1920
2020-08-28 09:32:22.386 23369-24530/us.zoom.sdkexample I/MobileRTCVideoView: onGLSurfaceChanged group index =194751866, width=1080, height=1920
2020-08-28 09:32:22.422 23369-23369/us.zoom.sdkexample I/MobileRTCVideoView: onGLSurfaceChanged: groupIndex = 194751866, width=1080, height=1920
2020-08-28 09:32:22.423 23369-23369/us.zoom.sdkexample I/MobileRTCVideoView: startRender: group index = 194751866
2020-08-28 09:32:22.445 23369-23369/us.zoom.sdkexample W/CameraBase: An error occurred while connecting to camera 1: Service not available
2020-08-28 09:32:22.454 23369-23369/us.zoom.sdkexample W/CameraBase: An error occurred while connecting to camera 1: Service not available
2020-08-28 09:32:22.461 23369-23369/us.zoom.sdkexample I/MobileRTCVideoView: onGLSurfaceChanged: groupIndex = 194751866, width=1080, height=1920
2020-08-28 09:32:24.880 23369-23369/us.zoom.sdkexample D/ZoomSDKExample: onMeetingStatusChanged MEETING_STATUS_WAITINGFORHOST:0

Also one more issue is there how to enable audio when I am starting the meeting from SDK by default audio is not enable.

Thanks!

@jagruti, thank you for providing the logs.

Using our sample app, I am not able to reproduce this behavior with the following steps with 2 devices:

  1. On device 1, login using the email/password of the account that has created the webinar
  2. On device 1, enter the webinar number and press the “start this meeting” button
  3. On device 1, observe the webinar starting as expected
  4. On device 2, without logging in, enter the meeting number and a user name and press the “join meeting” button
  5. On device 2, observe the webinar starting and see video from the first device available

Let me know if you’re seeing different behavior after taking these same steps.

Also one more issue is there how to enable audio when I am starting the meeting from SDK by default audio is not enable.

You can connect to audio programmatically through InMeetingAudioController#connectAudioWithVoIP:
ZoomSDK.getInstance().getInMeetingService().getInMeetingAudioController().connectAudioWithVoIP();

Thanks!