Commit 48afe0f2 by 万齐军

Merge branch 'feat/qj/netease2' into 'd/v4.4.08'

云信2.0升级

See merge request app_android_lib/YDL-Component!334
parents c28d0699 813193a9
...@@ -4,11 +4,10 @@ package com.ydl.component.base; ...@@ -4,11 +4,10 @@ package com.ydl.component.base;
import android.content.Context; import android.content.Context;
import com.ydl.component.BuildConfig; import com.ydl.component.BuildConfig;
import com.ydl.ydlcommon.base.config.GlobalConfig;
import com.ydl.ydlcommon.base.config.IConfigModule; import com.ydl.ydlcommon.base.config.IConfigModule;
import com.ydl.ydlcommon.base.config.YDLConstants; import com.ydl.ydlcommon.base.config.YDLConstants;
import com.ydl.ydlcommon.base.delegate.IAppLifecycles; import com.ydl.ydlcommon.base.delegate.IAppLifecycles;
import com.ydl.ydlcommon.base.config.GlobalConfig;
import com.ydl.ydlcommon.utils.YDLCacheUtils;
import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.NotNull;
...@@ -20,8 +19,8 @@ import java.util.List; ...@@ -20,8 +19,8 @@ import java.util.List;
*/ */
public final class DemoGlobalConfig implements IConfigModule { public final class DemoGlobalConfig implements IConfigModule {
String APP_DOMAIN = "https://api.github.com/"; String APP_DOMAIN = "https://api.github.com/";
// public static String appEnv = YDLConstants.ENV_TEST; public static String appEnv = YDLConstants.ENV_TEST;
public static String appEnv = YDLConstants.ENV_PROD; // public static String appEnv = YDLConstants.ENV_PROD;
// public static String appEnv = YDLConstants.ENV_NEW_TEST;//配置未上传到maven库 // public static String appEnv = YDLConstants.ENV_NEW_TEST;//配置未上传到maven库
@Override @Override
......
...@@ -60,7 +60,7 @@ dependencies { ...@@ -60,7 +60,7 @@ dependencies {
api rootProject.ext.dependencies["ydl-user-router"] api rootProject.ext.dependencies["ydl-user-router"]
implementation rootProject.ext.dependencies["BaseRecyclerViewAdapterHelper"] implementation rootProject.ext.dependencies["BaseRecyclerViewAdapterHelper"]
implementation('com.netease.yunxin.kit:call-ui:1.5.9-SNAPSHOT') { implementation('com.netease.yunxin.kit:call-ui:1.6.1') {
exclude group: "com.netease.nimlib", module: "avsignalling" exclude group: "com.netease.nimlib", module: "avsignalling"
exclude group: "com.netease.nimlib", module: "basesdk" exclude group: "com.netease.nimlib", module: "basesdk"
} }
......
...@@ -47,6 +47,7 @@ public class NimUICallInit { ...@@ -47,6 +47,7 @@ public class NimUICallInit {
CallKitUIOptions options = new CallKitUIOptions.Builder() CallKitUIOptions options = new CallKitUIOptions.Builder()
// 必要:音视频通话 sdk appKey,用于通话中使用 // 必要:音视频通话 sdk appKey,用于通话中使用
.rtcAppKey(appKey) .rtcAppKey(appKey)
.audio2VideoConfirm(true)
.logRootPath(NimSDKOptionConfig.getAppCacheDir(context) + "/yidianling") .logRootPath(NimSDKOptionConfig.getAppCacheDir(context) + "/yidianling")
// 必要:当前用户 AccId // 必要:当前用户 AccId
.currentUserAccId(userId) .currentUserAccId(userId)
...@@ -80,7 +81,7 @@ public class NimUICallInit { ...@@ -80,7 +81,7 @@ public class NimUICallInit {
// .p2pAudioActivity(TestActivity.class) // .p2pAudioActivity(TestActivity.class)
// .p2pVideoActivity(TestActivity.class) // .p2pVideoActivity(TestActivity.class)
// 请求 rtc token 服务,若非安全模式则不需设置 // 请求 rtc token 服务,若非安全模式则不需设置
.rtcTokenService((uid, callback) -> requestRtcToken(uid, callback)) // 自己实现的 token 请求方法 .rtcTokenService((uid, channelName, callback) -> requestRtcToken(uid, channelName, callback)) // 自己实现的 token 请求方法
// 设置初始化 rtc sdk 相关配置,按照所需进行配置 // 设置初始化 rtc sdk 相关配置,按照所需进行配置
.rtcSdkOption(new NERtcOption()) .rtcSdkOption(new NERtcOption())
// 呼叫组件初始化 rtc 范围,true-全局初始化,false-每次通话进行初始化以及销毁 // 呼叫组件初始化 rtc 范围,true-全局初始化,false-每次通话进行初始化以及销毁
...@@ -92,10 +93,10 @@ public class NimUICallInit { ...@@ -92,10 +93,10 @@ public class NimUICallInit {
} }
@SuppressLint("CheckResult") @SuppressLint("CheckResult")
private static void requestRtcToken(long uid, RequestCallback<String> callback) { private static void requestRtcToken(long uid, String channelName, RequestCallback<String> callback) {
Map<String, String> body = new HashMap<>(); Map<String, String> body = new HashMap<>();
if (curChannelName != null) { if (channelName != null) {
body.put("channelName", curChannelName); body.put("channelName", channelName);
} }
body.put("uid", String.valueOf(uid)); body.put("uid", String.valueOf(uid));
ImHttpImpl.Companion.getInstance().getImApi().nim2Token(body) ImHttpImpl.Companion.getInstance().getImApi().nim2Token(body)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment