Return To Meeting button

How to add a “Return to Meeting” button?
I used this method in the onCreate() method, but it is giving a NullPointerException.

public void inMeetingButton(){
        MeetingStatus status;
        status = ZoomSDK.getInstance().getMeetingService().getMeetingStatus();
        if(status == MeetingStatus.MEETING_STATUS_INMEETING || status == MeetingStatus.MEETING_STATUS_IN_WAITING_ROOM ||                status == MeetingStatus.MEETING_STATUS_RECONNECTING || status == MeetingStatus.MEETING_STATUS_UNKNOWN ||
                status == MeetingStatus.MEETING_STATUS_WAITINGFORHOST ||
                status == MeetingStatus.MEETING_STATUS_CONNECTING){
        } else {

button3 is the Return to Meeting button.

Which Android Client SDK version?


Smartphone (please complete the following information):

  • Device: Xiaomi Redmi Note 9
  • OS: Android 10

Hi @soumoghosh37, thanks for the post.

The error you are seeing is happening because you are trying to access the MeetingService too soon. The SDK must be successfully initialized before any of the classes provided by it are non-null. You can find more information on how to initialize the SDK here.


1 Like

Hi @jon.lieblich,

Actually I am initializing it twice (tried with once, did not work), first at the beginning of the onCreate() method, and then again in this method.

My iniatializeSdk():

public void initializeSdk(Context context) {

        ZoomSDK sdk = ZoomSDK.getInstance();
        ZoomSDKInitParams params = new ZoomSDKInitParams();
        params.appSecret = Credentials.SDK_SECRET;
        params.appKey = Credentials.SDK_KEY;
        params.domain = Credentials.SDK_DOMAIN;
        params.enableLog = true;

        ZoomSDKInitializeListener listener = new ZoomSDKInitializeListener() {
            public void onZoomSDKInitializeResult(int i, int i1) {

            public void onZoomAuthIdentityExpired() { }
        sdk.initialize(context, listener, params);

My onCreate():

    protected void onCreate(Bundle savedInstanceState) {
        initializeSdk(this); //Zoom SDK Initialization

Also please check the question again, I have edited it and included the initializeSdk().

Thank you!

Hi @soumoghosh37,

Thanks for providing the code snippets. Just calling the initialize method on the SDK does not mean that it has been successfully initialized. In your ZoomSDKInitializeListener instance, you will need to receive a result with an error code of ZoomError.ZOOM_ERROR_SUCCESS. Upon receiving this, you can begin using the SDK to join or start a meeting.


1 Like

Hi @jon.lieblich

Can you please tell me how to do this, or maybe give a link where I can find some information about this? I am not able to understand how to get a result from the instance.


Hi @soumoghosh37,

Our SDK initialization documentation should provide you with all of the information you need to properly initialize the SDK. If you have any specific questions on this flow, please let me know and I will be happy to help. :slightly_smiling_face:


This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.