# Zoom android sdk joinSession() success, but isInSession() return false

**URL:** <https://devforum.zoom.us/t/zoom-android-sdk-joinsession-success-but-isinsession-return-false/117400>\
**Category:** Android\
**Created:** [September 13, 2024, 3:32am UTC](https://devforum.zoom.us/t/zoom-android-sdk-joinsession-success-but-isinsession-return-false/117400 "2024-09-13T03:32:27Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![zzhang](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/zzhang/32/63291_2.png) [@zzhang](https://devforum.zoom.us/u/zzhang)\
**Post date:** [September 13, 2024, 3:32am UTC](https://devforum.zoom.us/t/zoom-android-sdk-joinsession-success-but-isinsession-return-false/117400/1 "2024-09-13T03:32:27Z")

</div>

**Description**  
I am try to write a zoom video sdk plugin for my android application, so that the device’s audio can connect correctly. While following the instruction on zoom video sdk android integration, I am able to initialize the zoom video sdk correctly, and join session call return not None value. While the connect audio function: startAudio() does not return success result. After some investigation, I realized it is due to the user is not in the session as isInSession() function always return false.

I would like to get some help regarding the problem of joinSession() been successful but isInSession() return false.

**Which Android Video SDK version?**  
‘us.zoom.videosdk:zoomvideosdk-core:1.12.5’

**To Reproduce(If applicable)**  
Steps to reproduce the behavior:

1. Initialize zoom video sdk
2. Calling joinSession() function
3. Assert joinSession() return not null result, then call isInSession() function
4. isInSession() always return false

**Screenshots**

```auto
2024-09-13 13:31:17.694 7063-7063 my-java-plgin com.example.app D SOPHIA - successfully initigetApplicationContextalized the zoom SDK -- ZoonNativeVideo
2024-09-13 13:31:26.620 7063-7163 my-java-plgin com.example.app D join() - Joining sesion 
2024-09-13 13:31:26.620 7063-7163 my-java-plgin com.example.app D join() - token:eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhcHBfa2V5IjoiWVl2dTh6Ql9Rc0tFdzRPSXByTGxydyIsInJvbGVfdHlwZSI6MSwidHBjIjoiODE0Njg2NzQiLCJ2ZXJzaW9uIjoxLCJpYXQiOjE3MjYxMDc1NjAsImV4cCI6MTcyNjExNDc2MCwidXNlcl9pZGVudGl0eSI6NTA4NTAwNDR9.jh_SRZ0iYeP0m3zEMoyNgztBKaIxrKda5OYb3OKIJ_g
2024-09-13 13:31:26.620 7063-7163 my-java-plgin com.example.app D join() - sessionName:81468674
2024-09-13 13:31:26.620 7063-7163 my-java-plgin com.example.app D join() - userName:50850044_audio
2024-09-13 13:31:26.620 7063-7163 my-java-plgin com.example.app D join() - zoomContext.token :eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhcHBfa2V5IjoiWVl2dTh6Ql9Rc0tFdzRPSXByTGxydyIsInJvbGVfdHlwZSI6MSwidHBjIjoiODE0Njg2NzQiLCJ2ZXJzaW9uIjoxLCJpYXQiOjE3MjYxMDc1NjAsImV4cCI6MTcyNjExNDc2MCwidXNlcl9pZGVudGl0eSI6NTA4NTAwNDR9.jh_SRZ0iYeP0m3zEMoyNgztBKaIxrKda5OYb3OKIJ_g
2024-09-13 13:31:26.620 7063-7163 my-java-plgin com.example.app D join() - zoomContext.sessionName:81468674
2024-09-13 13:31:26.620 7063-7163 my-java-plgin com.example.app D join() - zoomContext.userName:50850044_audio
2024-09-13 13:31:26.639 7063-7163 my-java-plgin com.example.app D join() - succeed, sessionId: 
2024-09-13 13:31:26.640 7063-7163 my-java-plgin com.example.app D  
2024-09-13 13:31:26.640 7063-7163 my-java-plgin com.example.app D join() - succeed, sessionName: 
2024-09-13 13:31:26.641 7063-7163 my-java-plgin com.example.app D 81468674
2024-09-13 13:31:26.641 7063-7163 my-java-plgin com.example.app D join() - isInSession:
2024-09-13 13:31:26.641 7063-7163 my-java-plgin com.example.app D false

```

Above is the log I printed for the below code:

```auto
    ZoomVideoSDKSessionContext zoomContext = new ZoomVideoSDKSessionContext();
    zoomContext.token = token;
    zoomContext.sessionName = sessionName;
    zoomContext.userName = userName;
    zoomContext.audioOption = audioOption;

    Log.d(TAG, "join() - zoomContext.token :" + zoomContext.token );
    Log.d(TAG, "join() - zoomContext.sessionName:" + zoomContext.sessionName);
    Log.d(TAG, "join() - zoomContext.userName:"+ zoomContext.userName);

    ZoomVideoSDK sdk = ZoomVideoSDK.getInstance();

    ZoomVideoSDKSession session = sdk.joinSession(zoomContext);
    if (session != null) {
      Log.d(TAG, "join() - succeed, sessionId: ");
      Log.d(TAG, session.getSessionID());
      Log.d(TAG, "join() - succeed, sessionName: ");
      Log.d(TAG, session.getSessionName());
      boolean isInSession = sdk.isInSession();
      Log.d(TAG, "join() - isInSession:");
      Log.d(TAG, String.valueOf(isInSession));

```

**Troubleshooting Routes**  
Tried to use random string as JWT token, the `joinSession()` function return null, while the JWT token provided to succesful connect the call returns a not null value, so I assume the problem is not related to JWT token. Besides, the same jwt token is able to successfully join the session on IOS device.

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

- Device: Pixel 2

---

<div class="post-metadata">

**Author:** ![zzhang](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/zzhang/32/63291_2.png) [@zzhang](https://devforum.zoom.us/u/zzhang)\
**Post date:** [September 16, 2024, 7:42am UTC](https://devforum.zoom.us/t/zoom-android-sdk-joinsession-success-but-isinsession-return-false/117400/2 "2024-09-16T07:42:14Z")

</div>

Seems it is due to sdk version issue, I was use 1.5.2 in the project, try to created a minimal project with latest sdk, 1.12.5, it is working.

---

<div class="post-metadata">

**Author:** ![boonjun.tan](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/boonjun.tan/32/38306_2.png) [@boonjun.tan](https://devforum.zoom.us/u/boonjun.tan)\
**Post date:** [September 27, 2024, 7:42am UTC](https://devforum.zoom.us/t/zoom-android-sdk-joinsession-success-but-isinsession-return-false/117400/3 "2024-09-27T07:42:53Z")

</div>

Hi @zzhang,

I am glad that you got it working but I don’t think the version upgrade actually resolves this. After calling the joinSession, the SDK establish to attempt to join into the session but by having to call the isInSession right after that should always give a false most of the time. The correct place to know if the local user is indeed in the session is in the [ZoomVideoSDKDelegate’s onSessionJoin](https://marketplacefront.zoom.us/sdk/custom/android/us/zoom/sdk/ZoomVideoSDKDelegate.html#onSessionJoin()) callback or onError callback.

Cheers.

---

<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:** [October 27, 2024, 5:43pm UTC](https://devforum.zoom.us/t/zoom-android-sdk-joinsession-success-but-isinsession-return-false/117400/4 "2024-10-27T17:43:29Z")

</div>

Closed on October 27, 2024, 5:43pm UTC

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