Commit 823d66fb by 严久程

倾述和咨询声网页面去重

parent a6393309
......@@ -42,7 +42,7 @@ ext {
ydlPublishVersion = [
// -------------- 业务模块 --------------
//第三步 若干
"m-confide" : "0.0.48.7.22",
"m-confide" : "0.0.48.7.24",
"m-consultant" : "0.0.57.4",
"m-fm" : "0.0.29.3",
"m-user" : "0.0.60.1",
......@@ -75,7 +75,7 @@ ext {
"ydl-webview" : "0.0.38.24",
"ydl-media" : "0.0.20",
"ydl-pay" : "0.0.17",
"m-audioim" : "0.0.48.3.12",
"m-audioim" : "0.0.48.3.14",
"ydl-flutter-base": "0.0.10.9",
//以下 几乎不会动
......@@ -121,7 +121,7 @@ ext {
"ydl-webview" : "0.0.38.24",
"ydl-media" : "0.0.20",
"ydl-pay" : "0.0.17",
"m-audioim" : "0.0.48.3.12",
"m-audioim" : "0.0.48.3.14",
"ydl-flutter-base": "0.0.10.9",
//以下 几乎不会动
......
......@@ -4,9 +4,11 @@ import android.annotation.SuppressLint
import android.content.Context
import android.text.TextUtils
import com.alibaba.android.arouter.launcher.ARouter
import com.google.gson.Gson
import com.ydl.audioim.http.AudioApiRequestUtil
import com.ydl.audioim.http.command.ConnectExceptionCommand
import com.ydl.consultantim.ConsultantAudioHomeActivity
import com.ydl.ydl_av.chat.bean.AudioMessageBean
import com.ydl.ydl_av.messge_service.YDLRTMClient
import com.ydl.ydl_av.messge_service.bean.RTMMesssage
import com.ydl.ydl_av.messge_service.callback.CallListener
......@@ -200,7 +202,10 @@ class YDLavManager {
fun receivedCall(content: String?) {
if (!TextUtils.isEmpty(content)) {
//如果已经接听了用户电话 再有电话进来 是不能接听的
if (!activityIsExists(ConsultantAudioHomeActivity::class.java) || ActivityManager.getInstance().getTopTaskActivity() !is AudioHomeActivity) {
if (!activityIsExists(ConsultantAudioHomeActivity::class.java) && !activityIsExists(
AudioHomeActivity::class.java
)
) {
//延时启动通话界面,防止刚打开就被main遮挡
Observable.timer(1000, TimeUnit.MILLISECONDS).subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
......@@ -212,6 +217,12 @@ class YDLavManager {
.navigation()
}
} else {
try {
val mAudioMessageBean = Gson().fromJson(content, AudioMessageBean::class.java)
YDLRTMClient.instances.refuseCall(mAudioMessageBean.channelId)
} catch (e: Exception) {
}
LogUtil.d("[agora]收到声网邀请,但界面实例已存在")
}
} else {
......
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