Commit b8914911 by YKai

feat:倾诉订单接通率优化,5s未连接挂断改为15

parent d2b01bf7
......@@ -617,6 +617,8 @@ class AudioHomeActivity :
requestPermission()
}
else -> {
// 拒绝权限操作发送给服务端
uploadException("AudioNotAuth","zhu",YDLavManager.AUDIO_NO_AUTH_ERROR_CODE,null)
writeAgoraLog("拒绝请求音频权限")
uploadLog()
ToastHelper.show(getString(R.string.audioim_need_storage_permission_hint))
......
......@@ -56,9 +56,9 @@ class YDLavManager {
val instances: YDLavManager by lazy(mode = LazyThreadSafetyMode.SYNCHRONIZED) {
YDLavManager()
}
const val AUDIO_NO_AUTH_ERROR_CODE = "97"//音频权限未通过错误码
}
private constructor()
fun init(context: Context, appId: String) {
YDLRTMClient.instances.init(context, appId, listener)
......
......@@ -152,7 +152,6 @@ class ConsultantAudioHomeActivity :
voiceManage!!.getVoiceApi().setEnableSpeakerphone(false)
//5s倒计时,5s后还是连接中,则直接关闭页面
connectingStatusWaitingTimeCount()
tv_tips.visibility = View.INVISIBLE
......@@ -174,7 +173,6 @@ class ConsultantAudioHomeActivity :
voiceManage!!.getVoiceApi().setEnableSpeakerphone(false)
//5s倒计时,5s后还是连接中,则直接关闭页面
connectingStatusWaitingTimeCount()
}
}
......@@ -876,13 +874,13 @@ class ConsultantAudioHomeActivity :
}
/**
*连接中状态倒计时:5s后如果还是处于连接中,则直接退出当前页面
*连接中状态倒计时:15s后如果还是处于连接中,则直接退出当前页面
*/
private fun connectingStatusWaitingTimeCount() {
if (connectingStatusDisposable == null) {
connectingStatusDisposable =
Observable.interval(0, 1, TimeUnit.SECONDS).subscribeOn(Schedulers.computation())
.take(6).observeOn(AndroidSchedulers.mainThread()).subscribe({}, {}, {
.take(16).observeOn(AndroidSchedulers.mainThread()).subscribe({}, {}, {
if (!isConnectSuccess) {
YDLavManager.instances.callEndStatusUpdate(
mAudioMessageBean?.channelId!!,
......
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