# Return To Meeting button

**URL:** <https://devforum.zoom.us/t/return-to-meeting-button/54857>\
**Category:** Android\
**Created:** [July 28, 2021, 12:17pm UTC](https://devforum.zoom.us/t/return-to-meeting-button/54857 "2021-07-28T12:17:59Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![soumoghosh37](https://avatars.discourse-cdn.com/v4/letter/s/b2d939/32.png) [@soumoghosh37](https://devforum.zoom.us/u/soumoghosh37)\
**Post date:** [July 28, 2021, 12:17pm UTC](https://devforum.zoom.us/t/return-to-meeting-button/54857/1 "2021-07-28T12:17:59Z")

</div>

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

```auto
public void inMeetingButton(){
        initializeSdk(this);
        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){
            button1.setVisibility(View.INVISIBLE);
            button3.setVisibility(View.VISIBLE);
            textview1.setVisibility(View.INVISIBLE);
            edittext1.setVisibility(View.INVISIBLE);
            til1.setVisibility(View.INVISIBLE);
        } else {
            button3.setVisibility(View.INVISIBLE);
        }

```

`button3` is the Return to Meeting button.

**Which Android Client SDK version?**  
v5.5.1.1319

**Screenshots**

 ![Screenshot (17)](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/3X/c/9/c9fbc95da1c157e259fd94740d77a7fb75cc0c7e.png)  
 ![Screenshot (18)](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/3X/3/1/318eefcd6fc429f3ecb09dd3dd3de3d4dee0e7e1.png)  
 ![Screenshot (19)](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/3X/a/0/a0b9b23c50342cd90527cb2811a330cab0c4b1a3.png)

**Smartphone (please complete the following information):**

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

---

<div class="post-metadata">

**Author:** ![jon.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/jon.zoom/32/13495_2.png) [@jon.zoom](https://devforum.zoom.us/u/jon.zoom)\
**Post date:** [July 28, 2021, 5:38pm UTC](https://devforum.zoom.us/t/return-to-meeting-button/54857/2 "2021-07-28T17:38:04Z")

</div>

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](https://marketplace.zoom.us/docs/sdk/native-sdks/android/mastering-zoom-sdk/sdk-initialization).

Thanks!

---

<div class="post-metadata">

**Author:** ![soumoghosh37](https://avatars.discourse-cdn.com/v4/letter/s/b2d939/32.png) [@soumoghosh37](https://devforum.zoom.us/u/soumoghosh37)\
**Post date:** [July 29, 2021, 4:41am UTC](https://devforum.zoom.us/t/return-to-meeting-button/54857/3 "2021-07-29T04:41:38Z")

</div>

Hi @jon.zoom,

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()`:

```auto
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() {
            @Override
            public void onZoomSDKInitializeResult(int i, int i1) {
            }

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

```

My `onCreate()`:

```auto
@Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        initializeSdk(this); //Zoom SDK Initialization
        ....
}

```

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

Thank you!

---

<div class="post-metadata">

**Author:** ![jon.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/jon.zoom/32/13495_2.png) [@jon.zoom](https://devforum.zoom.us/u/jon.zoom)\
**Post date:** [July 29, 2021, 4:50pm UTC](https://devforum.zoom.us/t/return-to-meeting-button/54857/4 "2021-07-29T16:50:18Z")

</div>

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.

Thanks!

---

<div class="post-metadata">

**Author:** ![soumoghosh37](https://avatars.discourse-cdn.com/v4/letter/s/b2d939/32.png) [@soumoghosh37](https://devforum.zoom.us/u/soumoghosh37)\
**Post date:** [August 3, 2021, 11:20am UTC](https://devforum.zoom.us/t/return-to-meeting-button/54857/5 "2021-08-03T11:20:49Z")

</div>

Hi @jon.zoom

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.

Thanks!

---

<div class="post-metadata">

**Author:** ![jon.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/jon.zoom/32/13495_2.png) [@jon.zoom](https://devforum.zoom.us/u/jon.zoom)\
**Post date:** [August 4, 2021, 2:05am UTC](https://devforum.zoom.us/t/return-to-meeting-button/54857/6 "2021-08-04T02:05:04Z")

</div>

Hi @soumoghosh37,

Our [SDK initialization documentation](https://marketplace.zoom.us/docs/sdk/native-sdks/android/mastering-zoom-sdk/sdk-initialization) 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. 🙂

Thanks!

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/3X/6/1/614bdd549b610bbaa46ff934617683a02bdaa03c.png) [@system](https://devforum.zoom.us/u/system)\
**Post date:** [September 3, 2021, 12:05pm UTC](https://devforum.zoom.us/t/return-to-meeting-button/54857/7 "2021-09-03T12:05:43Z")

</div>

Closed on September 3, 2021, 12:05pm UTC

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