Error with onClick method... list differ in length error

Description
I replicated the onClick method used in the demo app in my own app. However, I get an error stating the following:

“required: Context,JoinMeetingParams,JoinMeetingOptions
found: ZoomActivity,JoinMeetingParams
reason: actual and formal argument lists differ in length”

Client Android SDK version?
v5.4.3.613

Gradle Version
6.5 (Android plugin version 4.1.1)

Compiler
Android Studio

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

  1. Clone the demo app in entirety
  2. Add the zoom sdk to the project
  3. Import the new sdk modules (commonlib, mobilertc)
  4. Rename MainActivity to ZoomActivity (renaming associated xml file and all other references to MainActivity)
  5. Point MAIN startup intent to ZoomActivity in the AndroidManifest
  6. Change the package name from com.demo.zoom to com.foobar.zoom
  7. Build the app

Screenshots

Smartphone (please complete the following information):

  • Device: Samsung Galaxy Note 8
  • OS: Android 9

Additional context
The source in the zoom demo app and the source contained in this replica app are the SAME

Hi @johnsodd, thanks for the post.

Can you please provide a code snippet of the method that is producing this error?

Thanks!

Here is snippet of the onClick method. As stated, it compiles in your demo app but does not compile in mine.

public void onClickJoin(View view) {
if(!mZoomSDK.isInitialized())
{
Toast.makeText(this,“Init SDK First”,Toast.LENGTH_SHORT).show();
InitAuthSDKHelper.getInstance().initSDK(this, this);
return;
}

    if (ZoomSDK.getInstance().getMeetingSettingsHelper().isCustomizedMeetingUIEnabled()) {
        ZoomSDK.getInstance().getSmsService().enableZoomAuthRealNameMeetingUIShown(false);
    } else {
        ZoomSDK.getInstance().getSmsService().enableZoomAuthRealNameMeetingUIShown(true);
    }
    String number = numberEdit.getText().toString();
    String name = nameEdit.getText().toString();

    JoinMeetingParams params = new JoinMeetingParams();
    params.meetingNo = number;
    params.displayName = name;
    ZoomSDK.getInstance().getMeetingService().joinMeetingWithParams(this, params);
}

Hi @johnsodd ZoomSDK.getInstance().getMeetingService().joinMeetingWithParams need three arguments, please refer to document for this method

May I ask how your demo app is compiling and running with the same code. Is it likely you guys would have an error and publish it in your demo? I think you are just reading the compile error (as I did). There is something else wrong. I have two tickets open with you guys, and this was to prove my point with regard to using the same app that you guys have published on github. This can’t be the answer. Can you look at this again? I have attached a link to a video clip I made for you. Can you take a moment to look at it? I would greatly appreciate it.

ForZoom_02_23_21.mp4

Hi @johnsodd,

Our sample app contains the correct parameters for the joinMeetingWithParams method. The code you have locally has been altered, since the demo app compiles and builds correctly. Please see the required parameters in our reference docs here. Without the JoinMeetingOptions object passed into that method, your project will fail to build as it cannot compile.

Thanks!

Did anyone actually look at the clip I attached to the last response? Your response is the same as the prior response. I am just going to close this out and go and integrate Skype or another tool. You guys just rush through these tickets and you don’t really investigate and try to resolve. I think the emphasis is just responding at this point. I have emphasized in writing and in video clips that it is the same code. There is no difference (meaning unaltered). Your troubleshooting logic is simply if it compiles in the demo app, and it doesn’t compile in mine the code has to be altered…. I am just in awe. Nobody is asking about a ton of things, dependencies, sdk path, sdk dependencies, onClick method in the xml listener, or even taking a the time to define what the error message is truly trying to say. You just point me to a method definitions as if it is improperly defined.

Hi @johnsodd,

We apologize if there have been any lapses in communication and can assure you that we are doing our best to get your issue sorted out. In your code snippet, you have the following line:

ZoomSDK.getInstance().getMeetingService().joinMeetingWithParams(this, params);

Can you please try replacing it with this line?

ZoomSDK.getInstance().getMeetingService().joinMeetingWithParams(this, params, new JoinMeetingOptions());

Please let me know if you are still experiencing any issues after making that change and I will do my best to help. :slightly_smiling_face:

Thanks!

Jon,
You are a savior. Seriously, that’s how you apply good customer service. You simply take the time to listen and try to help. That little snippet solved a bigger problem. I have two tickets open and I had no idea they were related. I took a stab at revising some of my code by bringing in a some code from your demo app. I took that one line and applied it to our production app not knowing it would fix the bigger picture of the activity not loading after successful initialization.

I hope someone is reading your response. They really should take notes. I am over here reading developer notes on a competitors website that really didn’t want to use because I couldn’t get ahold of an extra-miler like you. Thanks again….

-Darren

1 Like

Very happy that I was able to help!

The kind words are greatly appreciated. :blue_heart: Hopefully the rest of your experience with the SDK is without any issues, but if you do need any additional help please don’t hesitate to reach back out in a new thread.

Thanks!

1 Like