Commit 94e0f519 by 霍志良

feat:倾诉通话页面增加阿里云埋点

parent 367b5be8
......@@ -5,7 +5,7 @@ ext {
ydlPublishVersion = [
// -------------- 业务模块 --------------
//第三步 若干
"m-confide" : "0.0.49.19",
"m-confide" : "0.0.49.20",
"m-consultant" : "0.0.60.03",
"m-fm" : "0.0.30.04",
"m-user" : "0.0.61.94",
......@@ -39,7 +39,7 @@ ext {
"ydl-webview" : "0.0.38.47",
"ydl-media" : "0.0.21.42",
"ydl-pay" : "0.0.18.19",
"m-audioim" : "0.0.49.29.42",
"m-audioim" : "0.0.49.29.44",
"ydl-flutter-base": "0.0.14.38",
//以下 几乎不会动
......@@ -88,7 +88,7 @@ ext {
// -------------- 业务模块 --------------
//第三步 若干
"m-confide" : "0.0.49.19",
"m-confide" : "0.0.49.20",
"m-consultant" : "0.0.60.03",
"m-fm" : "0.0.30.07",
"m-user" : "0.0.61.94",
......@@ -121,7 +121,7 @@ ext {
"ydl-webview" : "0.0.38.47",
"ydl-media" : "0.0.21.42",
"ydl-pay" : "0.0.18.19",
"m-audioim" : "0.0.49.29.42",
"m-audioim" : "0.0.49.29.44",
"ydl-flutter-base": "0.0.14.38",
//以下 几乎不会动
......
......@@ -651,40 +651,47 @@ class AudioHomeActivity :
*/
@SuppressLint("CheckResult")
private fun requestPermission() {
val rxPermissions = RxPermissions(this)
rxPermissions.requestEach(Manifest.permission.RECORD_AUDIO).subscribe { permission ->
when {
permission.granted -> {
writeAgoraLog("请求音频权限通过")
AliYunRichLogsHelper.getInstance()
.sendRichLog(AliYunLogConfig.AGORA, "请求音频权限通过")
init()
}
permission.shouldShowRequestPermissionRationale -> {
requestPermission()
}
else -> {
// 拒绝权限操作发送给服务端
uploadException(
"AudioNotAuth",
"zhu",
YDLavManager.AUDIO_NO_AUTH_ERROR_CODE,
null
)
writeAgoraLog("拒绝请求音频权限")
AliYunRichLogsHelper.getInstance()
.sendRichLog(AliYunLogConfig.AGORA, "拒绝请求音频权限")
uploadLog()
ToastHelper.show(getString(R.string.audioim_need_storage_permission_hint))
try {
val rxPermissions = RxPermissions(this)
rxPermissions.requestEach(Manifest.permission.RECORD_AUDIO).subscribe { permission ->
when {
permission.granted -> {
writeAgoraLog("请求音频权限通过")
AliYunRichLogsHelper.getInstance()
.sendRichLog(AliYunLogConfig.AGORA, "请求音频权限通过")
init()
}
permission.shouldShowRequestPermissionRationale -> {
requestPermission()
}
else -> {
// 拒绝权限操作发送给服务端
uploadException(
"AudioNotAuth",
"zhu",
YDLavManager.AUDIO_NO_AUTH_ERROR_CODE,
null
)
writeAgoraLog("拒绝请求音频权限")
AliYunRichLogsHelper.getInstance()
.sendRichLog(AliYunLogConfig.AGORA, "拒绝请求音频权限")
uploadLog()
ToastHelper.show(getString(R.string.audioim_need_storage_permission_hint))
val intent = Intent(Settings.ACTION_APPLICATION_DETAILS_SETTINGS)
val uri = Uri.fromParts("package", packageName, null)
intent.data = uri
startActivity(intent)
finish()
val intent = Intent(Settings.ACTION_APPLICATION_DETAILS_SETTINGS)
val uri = Uri.fromParts("package", packageName, null)
intent.data = uri
startActivity(intent)
finish()
}
}
}
}catch (e:Exception ){
AliYunRichLogsHelper.getInstance()
.sendRichLog(AliYunLogConfig.AGORA, "请求音频权限异常${e.message}")
init()
}
}
@SuppressLint("CheckResult", "SetTextI18n")
......@@ -708,6 +715,8 @@ class AudioHomeActivity :
sendDoctocrMsg = Gson().toJson(msgBean)
writeAgoraLog("主叫(用户)发送通话邀请")
AliYunRichLogsHelper.getInstance()
.sendRichLog(AliYunLogConfig.AGORA, "主叫(用户)发送通话邀请$msgBean")
rtcCall()
//开始50s等待倒计时
......@@ -730,6 +739,8 @@ class AudioHomeActivity :
}, {
LogUtil.d(it.message)
AliYunRichLogsHelper.getInstance()
.sendRichLog(AliYunLogConfig.AGORA, "倒计时异常${it.message}")
}) {
// waittingStatus()
if (!isConnectSuccess) {
......
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