Not able to integrate zoom in my application

爱⌒轻易说出口 提交于 2021-01-01 06:38:16

问题


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);
    }
}

回答1:


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.

Seriously I feel re-using an existing sample/code properly is a skill not many of you have developed. In all excitement, you forget the core funda. If you were working in timeframes like mine, you would know how to use things to your advantage and do the least number of changes. When it's freely available for use, seriously I would not waste time starting from scratch!!

I finished developing a completely new competitor product, along with hacking Android 9.0 CameraService to get zoom/pan working in the app layer. All within 2 weeks. Wish I could show off that but I guess you'll see it soon when it hits the market!




回答2:


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



来源:https://stackoverflow.com/questions/63041410/not-able-to-integrate-zoom-in-my-application

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!