onZoomSDKLoginResult has an old copy of the variable

On successful login, i have added the listener - ZoomSDK.getInstance().addAuthenticationListener(authListener); which calls the onZoomSDKLoginResult. I am checking for a variable that is updated in the onCreate of that activity. But it is having an old value. After a few seconds, i see that onZoomSDKLoginResult is called and see that the variable is updated now. Could you let me know how to get the updated value for the first time?

int result = ZoomSDK.getInstance().loginWithZoom(username, password);
if (result == ZoomApiError.ZOOM_API_ERROR_SUCCESS) {
// Request executed, listen for result to start meeting

Which Mobile Client SDK version?

Smartphone (please complete the following information):

  • Device: Google Pixel
  • OS: Android 10

Hi @nikithabagalkoti, thanks for the post.

Can you please clarify which variable you are referring to? Is it something provided by the SDK that is incorrect?


1 Like

Hi Jon,

It’s not a variable provided by SDK. Here is the scenario.

  1. I have an adapter with the list of names for which i can start a instant zoom meeting or schedule it for later.
  2. I select a name from the list to start the meeting now and the zoom activity is started using the intent with booleanExtra as “now”.
  3. I see that zoom activity has the value for now set to true and instant meeting is started.
  4. Next time I choose the option of scheduling the meeting later, following things happen. onZoomSDKLoginResult shows the old value for intent.getBooleanExtra. In the intent.getBooleanExtra i am still getting now as true.
    onZoomSDKLoginResult is called multiple times and i get the updated value for now as false later.

In the onCreate method of the new Zoom activity, i am getting the updated values properly sent from the adapter.

Scenario 2.
I am using an alert dialog from the onZoomSDKLoginResult to schedule a meeting later. Alert dialog uses the context which works well the first time.
On opening the alert dialog for the 2nd time, context isn’t updated in the onZoomSDKLoginResult function. Application crashes with the error -unable to add window – token null is not valid; is your activity running? This crash is usually caused by your app trying to display a dialogue using a previously finished Activity as a context.

Hope this is clear. Thanks in advance.

Hi @nikithabagalkoti,

Thank you for clarifying. It seems like this is an issue with the UI you are defining yourself, and is not directly related to the SDK. I understand that you are creating a dialog from one of the SDK’s callbacks, but the dialog would be defined in your app, so the SDK is not responsible for its behavior.


1 Like

Hi Jon.lieblich,

Thanks for the reply. Both the scenarios work outside your callback.
Scenario 1 - i get the updated booleanExtra in the onCreate method and not in your callback.
Scenario 2 - i create a dialog outside the callback and works everytime. There is no crash.

Could you please re-confirm? Thanks in advance.

Hi @nikithabagalkoti,

If this is being caused by a dialog that you are creating and not one made by the SDK, this means that it is an issue with the state of your application. The SDK cannot control what the state of your application will be by the time it receives this callback.


1 Like