Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
YDL-Component-Medical
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
杨凯
YDL-Component-Medical
Commits
e3cfc5ef
Commit
e3cfc5ef
authored
Sep 07, 2022
by
万齐军
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
上报处理与call fail处理
parent
6b85513f
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
20 deletions
+13
-20
AudioHomeActivity.kt
m-audioim/src/main/java/com/ydl/audioim/AudioHomeActivity.kt
+1
-1
YDLavManager.kt
m-audioim/src/main/java/com/ydl/audioim/YDLavManager.kt
+0
-14
ConsultantAudioHomeActivity.kt
m-audioim/src/main/java/com/ydl/consultantim/ConsultantAudioHomeActivity.kt
+12
-5
No files found.
m-audioim/src/main/java/com/ydl/audioim/AudioHomeActivity.kt
View file @
e3cfc5ef
...
@@ -341,7 +341,7 @@ class AudioHomeActivity :
...
@@ -341,7 +341,7 @@ class AudioHomeActivity :
}
}
Apm
.
reportEvent
(
"agora_android"
,
"occur_error"
,
"$err"
)
Apm
.
reportEvent
(
"agora_android"
,
"occur_error"
,
"$err"
)
AudioApiRequestUtil
.
reportCallEvent
(
channelId
,
RtcEvent
(
RtcEvent
.
Event
.
errorOccurred
),
errorCode
=
err
)
AudioApiRequestUtil
.
reportCallEvent
(
channelId
,
RtcEvent
(
RtcEvent
.
Event
.
errorOccurred
),
errorCode
=
err
)
channelId
?.
let
{
YDLavManager
.
instances
.
callEndStatusUpdate
(
it
,
60
,
"频道错误回调$err"
)
}
//
channelId?.let { YDLavManager.instances.callEndStatusUpdate(it, 60, "频道错误回调$err") }
}
}
override
fun
onApiCallExecuted
(
error
:
Int
,
api
:
String
?,
result
:
String
?)
{
override
fun
onApiCallExecuted
(
error
:
Int
,
api
:
String
?,
result
:
String
?)
{
...
...
m-audioim/src/main/java/com/ydl/audioim/YDLavManager.kt
View file @
e3cfc5ef
...
@@ -184,20 +184,6 @@ class YDLavManager {
...
@@ -184,20 +184,6 @@ class YDLavManager {
)
)
onConfideEvent
(
dimension
,
response
?.
ChannelId
)
onConfideEvent
(
dimension
,
response
?.
ChannelId
)
val
act
=
ActivityManager
.
getInstance
().
getTopTaskActivity
()
val
act
=
ActivityManager
.
getInstance
().
getTopTaskActivity
()
//专家离线或者30 秒后仍未收到专家响应,重新再邀请一次
when
(
errorCode
)
{
//被叫不在线 呼叫邀请发出 30 秒后被叫仍未 ACK 响应呼叫邀请
RtmStatusCode
.
LocalInvitationError
.
LOCAL_INVITATION_ERR_PEER_OFFLINE
,
RtmStatusCode
.
LocalInvitationError
.
LOCAL_INVITATION_ERR_PEER_NO_RESPONSE
->
{
if
(
act
is
AudioHomeActivity
)
{
act
.
runOnUiThread
{
act
.
rtcCall
()
}
}
}
RtmStatusCode
.
LocalInvitationError
.
LOCAL_INVITATION_ERR_INVITATION_EXPIRE
->
{
//呼叫邀请过期。被叫 ACK 响应呼叫邀请后 60 秒呼叫邀请未被取消、接受、拒绝,则呼叫邀请过期。
}
}
//呼叫失败日志输出
//呼叫失败日志输出
if
(
act
is
AudioHomeActivity
)
{
if
(
act
is
AudioHomeActivity
)
{
act
.
runOnUiThread
{
act
.
runOnUiThread
{
...
...
m-audioim/src/main/java/com/ydl/consultantim/ConsultantAudioHomeActivity.kt
View file @
e3cfc5ef
...
@@ -395,9 +395,11 @@ class ConsultantAudioHomeActivity :
...
@@ -395,9 +395,11 @@ class ConsultantAudioHomeActivity :
//110:生成的 Token 无效
//110:生成的 Token 无效
//123:此用户被服务器禁止
//123:此用户被服务器禁止
runOnUiThread
{
runOnUiThread
{
var
report
=
false
when
(
err
)
{
when
(
err
)
{
3
,
7
,
109
,
110
->
{
3
,
7
,
109
,
110
->
{
showToast
(
"请退出应用,重新打开"
)
showToast
(
"请退出应用,重新打开"
)
report
=
true
close
(
RESULT_NOT_ANSWERED_CODE
,
"咨询师已挂断"
)
close
(
RESULT_NOT_ANSWERED_CODE
,
"咨询师已挂断"
)
callEventSave
(
callEventSave
(
"80"
,
"80"
,
...
@@ -408,17 +410,20 @@ class ConsultantAudioHomeActivity :
...
@@ -408,17 +410,20 @@ class ConsultantAudioHomeActivity :
10
->
{
10
->
{
callEventSave
(
"80"
,
"err:${err} 专家网络较差"
)
callEventSave
(
"80"
,
"err:${err} 专家网络较差"
)
showToast
(
"当前网络较差,请更换网络"
)
showToast
(
"当前网络较差,请更换网络"
)
report
=
true
close
(
RESULT_NOT_ANSWERED_CODE
,
"专家网络较差"
)
close
(
RESULT_NOT_ANSWERED_CODE
,
"专家网络较差"
)
}
}
101
->
{
101
->
{
callEventSave
(
"80"
,
"err:${err} 不是有效的 APP ID"
)
callEventSave
(
"80"
,
"err:${err} 不是有效的 APP ID"
)
showToast
(
"安装包有问题,请联系技术"
)
showToast
(
"安装包有问题,请联系技术"
)
report
=
true
close
(
RESULT_NOT_ANSWERED_CODE
,
"安装包有问题,请联系技术"
)
close
(
RESULT_NOT_ANSWERED_CODE
,
"安装包有问题,请联系技术"
)
}
}
102
->
{
102
->
{
callEventSave
(
"80"
,
"err:${err} 不是有效的 频道名"
)
callEventSave
(
"80"
,
"err:${err} 不是有效的 频道名"
)
showToast
(
"频道错误,请联系技术"
)
showToast
(
"频道错误,请联系技术"
)
report
=
true
close
(
RESULT_NOT_ANSWERED_CODE
,
"频道错误,请联系技术"
)
close
(
RESULT_NOT_ANSWERED_CODE
,
"频道错误,请联系技术"
)
}
}
123
->
{
123
->
{
...
@@ -433,11 +438,13 @@ class ConsultantAudioHomeActivity :
...
@@ -433,11 +438,13 @@ class ConsultantAudioHomeActivity :
if
(
err
==
0
||
err
==
18
)
{
if
(
err
==
0
||
err
==
18
)
{
return
@runOnUiThread
return
@runOnUiThread
}
}
YDLavManager
.
instances
.
callEndStatusUpdate
(
if
(
report
)
{
mAudioMessageBean
?.
channelId
!!
,
YDLavManager
.
instances
.
callEndStatusUpdate
(
60
,
mAudioMessageBean
?.
channelId
!!
,
"频道错误回调${err} "
60
,
)
"频道错误回调${err} "
)
}
}
}
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment