Not able to integrate zoom in my application

Viewed 1102

I am trying to integrate zoom in my application. For that, I followed this link [https://marketplace.zoom.us/docs/sdk/native-sdks/android/getting-started/prerequisites]

I've created a new android project where I've imported the .aar files from zoom SDK as well as imported the dependencies but when I try to run this in my main application I get this error.

error: cannot find symbol
        JoinMeetingOptions opts = ZoomMeetingUISettingHelper.getJoinMeetingOptions();
                                  ^
  symbol:   variable ZoomMeetingUISettingHelper
  location: class MainActivity

Dependencies

dependencies {
    implementation fileTree(dir: "libs", include: ["*.jar"])
    implementation 'androidx.appcompat:appcompat:1.1.0'
    implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
    implementation project(path: ':commonlib')
    implementation project(path: ':mobilertc')
    testImplementation 'junit:junit:4.12'
    androidTestImplementation 'androidx.test.ext:junit:1.1.1'
    androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'

    implementation 'androidx.multidex:multidex:2.0.0'
    implementation 'androidx.recyclerview:recyclerview:1.0.0'
    implementation 'androidx.appcompat:appcompat:1.0.0'
    implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
    implementation 'com.google.android.material:material:1.0.0-rc01'

}

MainActivity


import androidx.appcompat.app.AppCompatActivity;


import android.content.Intent;
import android.os.Bundle;

import us.zoom.sdk.JoinMeetingOptions;
import us.zoom.sdk.JoinMeetingParams;
import us.zoom.sdk.ZoomSDK;
import us.zoom.sdk.ZoomSDKInitializeListener;


public class MainActivity extends AppCompatActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);

        ZoomSDK sdk = ZoomSDK.getInstance();
MeetingService meetingService = sdk.getMeetingService();

        sdk.initialize(this, App_Key, App_Secret, ZoomSDKInitializeListener);

        JoinMeetingOptions opts = ZoomMeetingUISettingHelper.getJoinMeetingOptions();
        JoinMeetingParams params = new JoinMeetingParams();
        params.displayName = displayName;
        params.meetingNo = meetingNo;
        params.password = meetingPassword;
        meetingService.joinMeetingWithParams(context, params, opts);
    }
}
2 Answers

Suggestion 1:

  1. Check the order of imports.
  2. Clean gradle cache at C:\Users\<USER>\.gradle\cache
  3. In Android Studio Invalidate & Restart
  4. Oh yeah found the problem: (You should have just done suggestion 2)
import com.***.inmeetingfunction.customizedmeetingui.MyMeetingActivity;
import com.***.inmeetingfunction.customizedmeetingui.SimpleZoomUIDelegate;
import com.***.inmeetingfunction.customizedmeetingui.view.MeetingWindowHelper;
import com.***.inmeetingfunction.zoommeetingui.ZoomMeetingUISettingHelper;

This class ZoomMeetingUISettingHelper is not part of the SDK. Its a custom class. That's why you cannot import it. Just copy it over from the sample.

Suggestion 2:

Same as I mentioned here: Just start with their sample application. Why you trying to re-invent the wheel importing libraries and stuff. Just use their existing sample as a starting point, and then go from there, create your new Activities, Views etc. Just don't use their Activities and Views you don't need. Once you are done with all the functionality, you can remove and do some cleaning up.

You have to import both commonlib.aar and mobilertc.aar . And inside your gradle paste this two implementation project(":commonlib") implementation project(":mobilertc")

Related