1、删除打包x86架构的配置

2、声网SO不做动态加载
3、美颜so动态加载
This commit is contained in:
老皮
2024-09-24 18:20:38 +08:00
parent 13a373c73b
commit b300541ce9
11 changed files with 109 additions and 55 deletions

View File

@@ -93,19 +93,12 @@ public class SWAuManager extends BaseCacheManager {
config.mAppId = CommonAppConfig.getSwAppId();
config.mEventHandler = mRtcEventHandler;
if(CommonAppConfig.IS_GOOGLE_PLAY == 0){
/*if(CommonAppConfig.IS_GOOGLE_PLAY == 0){
//链接包,声网加载下载的 So文件
String cpuAbi = "";
cpuAbi = Build.CPU_ABI;
File file = new File(mContext.getDir("lib", Context.MODE_PRIVATE).getAbsoluteFile(), com.yunbao.common.Constants.DOWNLOAD_Agora_SO + File.separator + cpuAbi);
File file = new File(mContext.getDir("lib", Context.MODE_PRIVATE).getAbsoluteFile(), com.yunbao.common.Constants.DOWNLOAD_Agora_SO + File.separator + Build.CPU_ABI);
config.mNativeLibPath = file.getAbsolutePath();
Log.i("downLoad", "声网 SO Path = " + config.mNativeLibPath);
// 美颜SO设置
File file_FaceUnity = new File(mContext.getDir("lib", Context.MODE_PRIVATE).getAbsoluteFile(), com.yunbao.common.Constants.DOWNLOAD_FaceUnity_SO + File.separator + cpuAbi);
faceunity.LoadConfig.loadLibrary(file_FaceUnity.getAbsolutePath());
Log.i("downLoad", "美颜SO Path = " + file_FaceUnity.getAbsolutePath());
}
Log.i("downLoad", "声网 SO Path 1 = " + config.mNativeLibPath);
}*/
// 创建并初始化 RtcEngine
mRtcEngine = (RtcEngineEx) RtcEngineEx.create(config);
@@ -129,14 +122,12 @@ public class SWAuManager extends BaseCacheManager {
config.mContext = mContext;
config.mAppId = CommonAppConfig.getSwAppId();
config.mEventHandler = mEventHandler;
if(CommonAppConfig.IS_GOOGLE_PLAY == 0){
/* if(CommonAppConfig.IS_GOOGLE_PLAY == 0){
//链接包,声网加载下载的 So文件
String cpuAbi = "";
cpuAbi = Build.CPU_ABI;
File file = new File(mContext.getDir("lib", Context.MODE_PRIVATE).getAbsoluteFile(), com.yunbao.common.Constants.DOWNLOAD_Agora_SO + File.separator + cpuAbi);
File file = new File(mContext.getDir("lib", Context.MODE_PRIVATE).getAbsoluteFile(), com.yunbao.common.Constants.DOWNLOAD_Agora_SO + File.separator + Build.CPU_ABI);
config.mNativeLibPath = file.getAbsolutePath();
Log.i("downLoad", "config.mNativeLibPath 2 = " + config.mNativeLibPath);
}
Log.i("downLoad", "声网 SO Path 2 = " + config.mNativeLibPath);
}*/
// 创建并初始化 RtcEngine
mRtcEngine = (RtcEngineEx) RtcEngineEx.create(config);
}

View File

@@ -1,6 +1,7 @@
package io.agora.beautyapi.faceunity.agora;
import android.app.Activity;
import android.app.LauncherActivity;
import android.content.Context;
import android.graphics.Bitmap;
import android.graphics.drawable.BitmapDrawable;
@@ -131,14 +132,13 @@ public class SWManager extends BaseCacheManager {
config.mContext = mContext;
config.mAppId = CommonAppConfig.getSwAppId();
config.mEventHandler = mRtcEventHandler;
if(CommonAppConfig.IS_GOOGLE_PLAY == 0){
/*if(CommonAppConfig.IS_GOOGLE_PLAY == 0){
//链接包,声网加载下载的 So文件
String cpuAbi = "";
cpuAbi = Build.CPU_ABI;
File file = new File(mContext.getDir("lib", Context.MODE_PRIVATE).getAbsoluteFile(), com.yunbao.common.Constants.DOWNLOAD_Agora_SO + File.separator + cpuAbi);
File file = new File(mContext.getDir("lib", Context.MODE_PRIVATE).getAbsoluteFile(), com.yunbao.common.Constants.DOWNLOAD_Agora_SO + File.separator + Build.CPU_ABI);
config.mNativeLibPath = file.getAbsolutePath();
Log.i("downLoad", "config.mNativeLibPath 2 = " + config.mNativeLibPath);
}
Log.i("downLoad", "声网 SO Path 3 = " + config.mNativeLibPath);
}*/
// 创建并初始化 RtcEngine
mRtcEngine = (RtcEngineEx) RtcEngineEx.create(config);