ZoomSDK.getInstance() is not being called from the main thread for Cordova app

The Android Zoom Meeting SDK in a Cordova app using an updated version of cordova.plugin.zoom plugin so ZoomSDK.getInstance() is not being called from the main thread.
Until v5.10.6.6361 it was working OK but when we tried to update the version to 5.11 we got “getInstance is not called from main thread” error when calling ZoomSDK.getInstance()

We need to ionic .

Which Android Meeting SDK version?
Since V.5.1, produced in v5.11.0.6883 and v5.11.1.6928

Smartphone (please complete the following information):
Any Android phone

Were you ever able to get this figured out?

Hi @shengming.yao ,

I ran the sample app in Meeting SDK 5.11, and noticed that ZoomSDK.getInstance() can work properly in the sample app.

Could you check if you run ZoomSDK.getInstance() in another thread in your app? If this is the case, you can try to run ZoomSDK.getInstance() in main thread by:

    runOnUiThread(new Runnable() {
        @Override
        public void run() {
            ZoomSDK.getInstance();
        }
    });

Please let me know if it works for you, thanks.

We are trying to build this using IONIC framework can you please suggest where and which files we can apply this changes exactly

I have tried in AuthThread.java of ZOOM

 new Handler(Looper.getMainLooper()).post(() -> {
    this.mZoomSDK = ZoomSDK.getInstance();

});

but still facing the same issue

Thanks in Advance

Hi @PursueCare , thanks for your feedback, can you please try Activity.runOnUiThread?

Example:

instance.getActivity().runOnUiThread(new Runnable() {
    @Override
    public void run() {
          this.mZoomSDK = ZoomSDK.getInstance();
    }
 }

Hi Thanks for the support

As per the suggestion i have implemented in the following way

cordova.getActivity().runOnUiThread(new Runnable() {
@Override
public void run() {
ZoomSDK zoomSDK = ZoomSDK.getInstance();
}
});

getInstace() not called from main thread is solved

Error : “isInitialized is not called from main thread”, source: http://localhost/main-es2015.js (2157)

When applied the same kind of runOnUniThread method facing Issue like “ZoomSDK has not been initialized successfully”

Thanks in advance

We are still seeing this error message “ZoomSDK has not been initialized successfully” after implementing your suggestions.

Hi @PursueCare , I think the problem is that you have not set up the required parameters for initializing ZoomSDK. Since we do not support ionic plugin anymore, there is no documentation about the setup of ionic app. But you can see the documentation of Meeting SDK Android for reference, to set up all the required fields:

https://marketplace.zoom.us/docs/sdk/native-sdks/android/build-an-app/