Commit 841206a3 by YKai

feat:m-audioim,m-confide组件升级

parent b136eb3e
......@@ -5,7 +5,7 @@ ext {
ydlPublishVersion = [
// -------------- 业务模块 --------------
//第三步 若干
"m-confide" : "0.0.49.01",
"m-confide" : "0.0.49.02",
"m-consultant" : "0.0.59.65",
"m-fm" : "0.0.30.01",
"m-user" : "0.0.61.10",
......@@ -39,7 +39,7 @@ ext {
"ydl-webview" : "0.0.38.36",
"ydl-media" : "0.0.21.6",
"ydl-pay" : "0.0.18.13",
"m-audioim" : "0.0.49.29.29",
"m-audioim" : "0.0.49.29.30",
"ydl-flutter-base": "0.0.14.20",
//以下 几乎不会动
......@@ -88,7 +88,7 @@ ext {
// -------------- 业务模块 --------------
//第三步 若干
"m-confide" : "0.0.49.01",
"m-confide" : "0.0.49.02",
"m-consultant" : "0.0.59.65",
"m-fm" : "0.0.30.01",
"m-user" : "0.0.61.10",
......@@ -120,7 +120,7 @@ ext {
"ydl-webview" : "0.0.38.36",
"ydl-media" : "0.0.21.6",
"ydl-pay" : "0.0.18.11",
"m-audioim" : "0.0.49.29.29",
"m-audioim" : "0.0.49.29.30",
"ydl-flutter-base": "0.0.14.20",
//以下 几乎不会动
......
......@@ -56,12 +56,12 @@ class YDLavManager {
//当前sdk的登录状态
var sdkStatus = -1
var isOnlineRtm = true // 账号在多端登录情况下判断RTM否在线,仅仅用在RTM互踢情况下判断是否在线,其它场景慎用
val instances: YDLavManager by lazy(mode = LazyThreadSafetyMode.SYNCHRONIZED) {
YDLavManager()
}
const val AUDIO_NO_AUTH_ERROR_CODE = "97"//音频权限未通过错误码
const val IS_ONLINE_RTM = "is_online_rtm" // rtm是否在线
}
......@@ -381,6 +381,7 @@ class YDLavManager {
LogUtil.e("[agora]login-uid:$userId")
return
}
isOnlineRtm = true
//登录实时消息
//获取token
AudioApiRequestUtil.getAgoraToken().subscribeOn(Schedulers.io())
......@@ -393,7 +394,6 @@ class YDLavManager {
override fun onSuccess() {
//登陆成功,发起呼叫
LogUtil.e("[agora]实时消息登录成功")
RxSPTool.putBoolean(BaseApp.getApp(), IS_ONLINE_RTM,true)
writeAgoraLog("声网rtm登录成功,uid:$userId-------Time:${AudioLogUtils.format.format(Calendar.getInstance().time)}", "confide.log", true)
event(true, "")
}
......@@ -478,7 +478,6 @@ class YDLavManager {
override fun onSuccess() {
//退出登陆成功
LogUtil.d("[agora]实时消息退出成功")
RxSPTool.putBoolean(BaseApp.getApp(), IS_ONLINE_RTM,false)
if (isReLogin){
login(ModularServiceManager.provide(IUserService::class.java).getUserInfo()?.uid)
}
......@@ -560,6 +559,7 @@ class YDLavManager {
* */
if (reason==CONNECTION_CHANGE_REASON_REMOTE_LOGIN){
if (!activityIsExists(ConsultantAudioHomeActivity::class.java)&&!activityIsExists(AudioHomeActivity::class.java)){
isOnlineRtm = false
logout()
}else{
logout(true)
......
......@@ -111,7 +111,7 @@ class ConfideWebServiceImpl {
if (it.data?.dialDetail?.callConnectType ?: -1 == 3) {
//声网
it.data?.dialDetail?.agoraExpertInfo ?: return@subscribe
if (!RxSPTool.getBoolean(BaseApp.getApp(), YDLavManager.IS_ONLINE_RTM)){
if (!YDLavManager.isOnlineRtm){ // 判断如果账号在其它设备登录rtm是否在线
ToastUtil.toastShort("网络通话错误代码001")
return@subscribe
}
......
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