android项目导入zoom视频会议流程

目录

一、新建项目

二、将两个文件包拷贝到项目目录下

三、在settings.gradle 中加入

四、在app的build.gradle中加入

五、app的build.gradle中;

六、将PomeloService拷贝到项目中,

七、编译项目,查漏补缺

八、在MyApplication进行初始化;

九、在Manifest中加入对应权限;


一、新建项目

新建项目后,app的build.gradle文件中targetSdkVersion设置为26或以下

apply plugin: 'com.android.application'

android {
    compileSdkVersion 26
    defaultConfig {
        applicationId "com.ph.zoomdemo"
        minSdkVersion 19
        targetSdkVersion 26
        versionCode 1
        versionName "1.0"
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"

        ndk {
            //设置支持的SO库架构,注意三方sdk需要各种架构so库,否则仅armeabi 会报错:device supports x86,armeabi-v7a,
            //  but apk only support armeabi
            abiFilter "armeabi-v7a" //, "armeabi", "x86" 按需设置
        }

    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}

configurations.all {
    resolutionStrategy.force 'com.android.support:support-annotations:26.1.0'
}

dependencies {
    implementation fileTree(dir: 'libs', include: ['*.jar'])
    implementation 'com.android.support:appcompat-v7:26.1.0'
    implementation 'com.android.support.constraint:constraint-layout:1.1.3'
    testImplementation 'junit:junit:4.12'
    androidTestImplementation 'com.android.support.test:runner:1.0.2'
    androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'

    //butterknife
    compile 'com.jakewharton:butterknife:8.5.1'
    annotationProcessor 'com.jakewharton:butterknife-compiler:8.5.1'
    //gson
    compile 'com.google.code.gson:gson:2.7'

    //glide
    compile 'com.github.bumptech.glide:glide:3.6.1'

    //okhttp3
    compile 'com.squareup.okhttp3:okhttp:3.4.2'
    compile 'com.squareup.okio:okio:1.7.0'

    //zoom视频聊天依赖包
    compile project(':zoomcommonlib')
    compile project(':zoommobilertc')

}

二、将两个文件包拷贝到项目目录下

如下图

三、在settings.gradle 中加入

include ':zoomcommonlib'    

include ':zoommobilertc'

四、在app的build.gradle中加入

compile project(':zoomcommonlib')  

compile project(':zoommobilertc')

五、app的build.gradle中;

(提醒:不加这个会报错)

ndk {
            //设置支持的SO库架构,注意三方sdk需要各种架构so库,否则仅armeabi 会报错:device supports x86,armeabi-v7a,
            //  but apk only support armeabi
            abiFilter "armeabi-v7a" //, "armeabi", "x86" 按需设置
        }

六、将PomeloService拷贝到项目中,

PomeloService拷贝后,声明PomeloService

其他所需的东西拷贝进去(java目录下建包 org.pomelo.network,并把对应文件拷贝进去);

七、编译项目,查漏补缺

把一些需要设置和拷贝的东西加入进项目

八、在MyApplication进行初始化;

记得在Manifest文件中配置application name:

public class App extends Application {

    //上下文
    private static Context mContext;
    private static int mMainThreadId;
    private static Handler mMainThreadHandler;

    private static final String APP_KEY = "JalUzHrB9MVQy21CPYDcVn9FKhEyVl0EtW5i";
    private static final String APP_SECRET = "Z4mVMhT1GMkBGJr3bvqQ59Eiv94B58ooNUtD";
    private static final String WEB_DOMAIN = "www.zoomus.cn";

    @Override
    public void onCreate() {
        super.onCreate();

        mContext = getApplicationContext();
        //主线程ID
        mMainThreadId = android.os.Process.myTid();
        //主线程Handler
        mMainThreadHandler = new Handler();

        OkHttpSingleton.getInstance().init(this);

        initZoomSDK();

    }

    public static Context getContext() {
        return mContext;
    }

    //获取主线程id
    public static int getMainThreadId() {
        return mMainThreadId;
    }

    //获取主线程
    public static Handler getMainThreadHandler() {
        return mMainThreadHandler;
    }

    @Override
    protected void attachBaseContext(Context base) {
        super.attachBaseContext(base);
//        MultiDex.install(this);
    }

    private void initZoomSDK() {
        ZoomSDK sdk = ZoomSDK.getInstance();
        sdk.initialize(this, APP_KEY, APP_SECRET, WEB_DOMAIN, new ZoomSDKInitializeListener() {
            @Override
            public void onZoomSDKInitializeResult(int errorCode, int internalErrorCode) {
                Log.i("vivi", "onZoomSDKInitializeResult, errorCode=" + errorCode +
                        ", internalErrorCode=" + internalErrorCode);
            }
        });
    }

}

 

九、在Manifest中加入对应权限;

 <permission
        android:name="us.zoom.sdkexample.permission.KUBI_MESSAGE6"
        android:protectionLevel="signature" />

    <uses-permission android:name="us.zoom.sdkexample.permission.KUBI_MESSAGE6" />

注意:KUBI_MESSAGE6最后的数字一定不要与其他项目冲突,否则APP间会出现冲突。

 

关于方法数超过65535的问题解决方案:

com.android.dex.DexIndexOverflowException:(包括Android Studio3.0之前和之后解决方案)

 

 

 

 

  • 1
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 4
    评论
___ Using akZoom automatically for all 2D-plots in Matlab___ The standard usage of akZoom is "on demand", this means you have to call akZoom explicitly after plotting something like shown in the akZoom_examples.m file. However, if you are satisfied with the functionality, you can implement akZoom such that it is called automatically when calling plot, plotyy, etc.. To use akZoom automatically, you just have to include the folder "Wrapper of Matlab functions" to the Matlab search patch (here is how you do that: http://www.mathworks.de/de/help/matlab/ref/path.html). In this folder Matlab will find wrapper-functions for plot, plotyy, etc.. These wrapper-functions call the original functions and automatically add the akZoom call afterwards. Note: since we overload Matlabs own functions, you will get warnings like the following on Matlab startup: "Warning: Function ...\plot.m has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential name conflict." This can either just be ignored or, if it really bugs you, turned off with the following command: warning off MATLAB:dispatcher:nameConflict However, sometimes these kind of warnings can be usefull if you accidentally overload a Matlab function. So I recommend not to turn them off and just ignore them during startup. ___ Going back to default ___ If you do not want to call akZoom automatically, just remove the "Wrapper of Matlab functions" folder from the Matlab search path. ___ Using akZoom in GUIs ___ One important remark for GUI-programmers: When building an executable, Matlab somehow does not like it, when its built-in functions are overwritten. Therefore I recommend to call akZoom explicitly in the m-file of your GUI and remove the "Wrapper of Matlab functions" folder from the search path before building your application. If you have any questions or remarks just send me an email: alexander.kessel(at)mpq.mpg.de

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 4
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值