Commit 0060ff3d by 刘鹏

feat : 触发云信通知接口埋点

parent 0b7fdfae
......@@ -1150,6 +1150,8 @@ class AudioHomeActivity :
} else {
cmd.status = "CALL_OFF"
}
AliYunRichLogsHelper.getInstance()
.sendRichLog(AliYunLogConfig.AGORA, "用户加入频道后,通知服务端发送推送")
mPresenter.noticeServerPush(cmd)
}
......
......@@ -2,14 +2,17 @@ package com.ydl.audioim.presenter
import android.annotation.SuppressLint
import com.ydl.audioim.BuildConfig
import com.ydl.ydl_av.chat.config.YDLChatParam
import com.ydl.audioim.contract.IAudioHomeActivityContract
import com.ydl.audioim.http.command.*
import com.ydl.audioim.http.command.ConnectCommand
import com.ydl.audioim.http.command.NoticePushCommand
import com.ydl.audioim.model.AudioHomeModelImpl
import com.ydl.audioim.utils.AudioLogUtils
import com.ydl.ydl_av.chat.config.YDLChatParam
import com.ydl.ydlcommon.mvp.base.BasePresenter
import com.ydl.ydlcommon.router.YdlCommonRouterManager
import com.ydl.ydlcommon.utils.LogUtil
import com.ydl.ydlcommon.utils.log.AliYunLogConfig
import com.ydl.ydlcommon.utils.log.AliYunRichLogsHelper
import com.ydl.ydlcommon.utils.log.LogHelper
import com.ydl.ydlcommon.utils.remind.ToastHelper
import io.reactivex.android.schedulers.AndroidSchedulers
......@@ -113,30 +116,55 @@ class AudioHomePresenterImpl :
if (it.data?.dialDetail?.callConnectType ?: -1 == 1) {
//axb
mView.switchAXBResponse(it.data?.dialDetail?.phoneNu ?: "")
AudioLogUtils.writeAgoraLog("连接成功,连接状态:${it.data?.dialDetail?.dialStatus}-------Time:${AudioLogUtils.format.format(Calendar.getInstance().time
)}", "confide.log", true)
AudioLogUtils.writeAgoraLog(
"连接成功,连接状态:${it.data?.dialDetail?.dialStatus}-------Time:${
AudioLogUtils.format.format(
Calendar.getInstance().time
)
}", "confide.log", true
)
} else {
ToastHelper.show(it.data?.dialDetail?.dialReason ?: "连接失败")
AudioLogUtils.writeAgoraLog("连接状态:${it.data?.dialDetail?.dialStatus}失败原因:${it.data?.dialDetail?.dialReason}-------Time:${AudioLogUtils.format.format(Calendar.getInstance().time
)}", "confide.log", true)
AudioLogUtils.writeAgoraLog(
"连接状态:${it.data?.dialDetail?.dialStatus}失败原因:${it.data?.dialDetail?.dialReason}-------Time:${
AudioLogUtils.format.format(
Calendar.getInstance().time
)
}", "confide.log", true
)
LogHelper.getInstance().uploadLog(false)
}
} else {
ToastHelper.show(it.data?.dialDetail?.dialReason ?: "连接失败")
AudioLogUtils.writeAgoraLog("连接状态:${it.data?.dialDetail?.dialStatus}失败原因:${it.data?.dialDetail?.dialReason}-------Time:${AudioLogUtils.format.format(Calendar.getInstance().time
)}", "confide.log", true)
AudioLogUtils.writeAgoraLog(
"连接状态:${it.data?.dialDetail?.dialStatus}失败原因:${it.data?.dialDetail?.dialReason}-------Time:${
AudioLogUtils.format.format(
Calendar.getInstance().time
)
}", "confide.log", true
)
LogHelper.getInstance().uploadLog(false)
}
} else {
ToastHelper.show(it.data?.dialDetail?.dialReason ?: "连接失败")
AudioLogUtils.writeAgoraLog("连接状态:${it.data?.dialDetail?.dialStatus}失败原因:${it.data?.dialDetail?.dialReason}-------Time:${AudioLogUtils.format.format(Calendar.getInstance().time
)}", "confide.log", true)
AudioLogUtils.writeAgoraLog(
"连接状态:${it.data?.dialDetail?.dialStatus}失败原因:${it.data?.dialDetail?.dialReason}-------Time:${
AudioLogUtils.format.format(
Calendar.getInstance().time
)
}", "confide.log", true
)
LogHelper.getInstance().uploadLog(false)
}
}, { e ->
LogUtil.d(e.message)
AudioLogUtils.writeAgoraLog("连接状态:${e.message}-------Time:${AudioLogUtils.format.format(Calendar.getInstance().time
)}", "confide.log", true)
AudioLogUtils.writeAgoraLog(
"连接状态:${e.message}-------Time:${
AudioLogUtils.format.format(
Calendar.getInstance().time
)
}", "confide.log", true
)
LogHelper.getInstance().uploadLog(false)
})
}
......@@ -152,25 +180,46 @@ class AudioHomePresenterImpl :
.subscribe({
if (it.code == 200) {
AudioLogUtils.writeAgoraLog(
"通知服务端发送推送成功-------Time:${AudioLogUtils.format.format(
Calendar.getInstance().time
)}", "confide.log", true
"通知服务端发送推送成功-------Time:${
AudioLogUtils.format.format(
Calendar.getInstance().time
)
}", "confide.log", true
)
AliYunRichLogsHelper.getInstance()
.sendRichLog(
AliYunLogConfig.AGORA,
"通知服务端发送推送成功-------Time:${AudioLogUtils.format.format(Calendar.getInstance().time)}"
)
} else {
LogUtil.e(it.msg)
AudioLogUtils.writeAgoraLog(
"通知服务端发送推送失败${it.msg}-------Time:${AudioLogUtils.format.format(
Calendar.getInstance().time
)}", "confide.log", true
"通知服务端发送推送失败${it.msg}-------Time:${
AudioLogUtils.format.format(
Calendar.getInstance().time
)
}", "confide.log", true
)
AliYunRichLogsHelper.getInstance()
.sendRichLog(
AliYunLogConfig.AGORA,
"通知服务端发送推送失败${it.msg}-------Time:${AudioLogUtils.format.format(Calendar.getInstance().time)}"
)
LogHelper.getInstance().uploadLog(false)
}
}, { e ->
AudioLogUtils.writeAgoraLog(
"通知服务端发送推送失败${e.message}-------Time:${AudioLogUtils.format.format(
Calendar.getInstance().time
)}", "confide.log", true
"通知服务端发送推送失败${e.message}-------Time:${
AudioLogUtils.format.format(
Calendar.getInstance().time
)
}", "confide.log", true
)
AliYunRichLogsHelper.getInstance()
.sendRichLog(
AliYunLogConfig.AGORA,
"通知服务端发送推送失败${e.message}-------Time:${AudioLogUtils.format.format(Calendar.getInstance().time)}"
)
LogHelper.getInstance().uploadLog(false)
LogUtil.e(e.message)
})
......
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