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
381ea98e
Commit
381ea98e
authored
Apr 22, 2020
by
ydl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
callStatus异常上传逻辑更新
parent
07bf6e50
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
29 additions
and
3 deletions
+29
-3
AudioHomeActivity.kt
m-audioim/src/main/java/com/ydl/audioim/AudioHomeActivity.kt
+7
-1
YDLavManager.kt
m-audioim/src/main/java/com/ydl/audioim/YDLavManager.kt
+17
-2
ConsultantAudioHomeActivity.kt
m-audioim/src/main/java/com/ydl/consultantim/ConsultantAudioHomeActivity.kt
+5
-0
No files found.
m-audioim/src/main/java/com/ydl/audioim/AudioHomeActivity.kt
View file @
381ea98e
...
...
@@ -171,6 +171,8 @@ class AudioHomeActivity :
private
var
isLeavelChannel
:
Boolean
=
false
private
var
hasUpLoadLog
=
false
private
var
callStatus
:
Int
=
-
1
/**
* 声网事件回调 (SDK 通过指定的事件通知应用程序 SDK 的运行事件,如: 加入或离开频道,新用户加入频道等)
*/
...
...
@@ -1099,6 +1101,10 @@ class AudioHomeActivity :
}
}
fun
uploadExceptionStatus
(
msg
:
String
,
status
:
Int
)
{
callStatus
=
status
uploadException
(
msg
,
callback
=
null
)
}
/**
* 上传错误日志
...
...
@@ -1114,7 +1120,7 @@ class AudioHomeActivity :
var
uid
:
String
=
ModularServiceManager
.
provide
(
IUserService
::
class
.
java
).
getUserInfo
()
?.
uid
!!
var
payLoad
=
PayLoad
(
channelId
?:
"0"
,
time
,
uid
,
"1"
,
"999"
,
message
)
var
connectException
=
ConnectExceptionCommand
(
time
+
zhu
,
"2"
,
eventType
,
payLoad
)
var
connectException
=
ConnectExceptionCommand
(
time
+
zhu
,
"2"
,
eventType
,
payLoad
,
callStatus
)
YDLavManager
.
instances
.
uploadException
(
connectException
,
callback
)
}
...
...
m-audioim/src/main/java/com/ydl/audioim/YDLavManager.kt
View file @
381ea98e
...
...
@@ -114,10 +114,9 @@ class YDLavManager {
//通话结束或挂断时,上传日志文件
act
.
uploadLog
()
act
.
leaveChannel
()
act
.
uploadExceptionStatus
(
"对方已拒绝"
,
2
)
}
}
}
override
fun
onCallCanceled
(
response
:
CallLocalResponse
?)
{
...
...
@@ -127,6 +126,7 @@ class YDLavManager {
if
(
act
is
AudioHomeActivity
)
{
act
.
runOnUiThread
{
act
.
writeAgoraLog
(
"主叫呼叫取消:超时或主动取消"
)
act
.
uploadExceptionStatus
(
"已取消"
,
1
)
}
}
}
...
...
@@ -150,6 +150,7 @@ class YDLavManager {
if
(
act
is
AudioHomeActivity
)
{
act
.
runOnUiThread
{
act
.
writeAgoraLog
(
"呼叫失败:${errorCode}"
)
act
.
uploadExceptionStatus
(
"对方未接听"
,
3
)
// //通话结束或挂断时,上传日志文件
// act.uploadLog()
// act.leaveChannel()
...
...
@@ -173,12 +174,22 @@ class YDLavManager {
override
fun
onRemoteInvitationRefused
(
response
:
CallRemoteResponse
?)
{
//返回给被叫
LogUtil
.
e
(
"[agora]已拒绝来自${response?.callerId}的呼叫"
)
val
act
=
ActivityManager
.
getInstance
().
getTopTaskActivity
()
if
(
act
is
ConsultantAudioHomeActivity
)
{
act
.
uploadExceptionStatus
(
"已拒绝"
,
2
)
}
}
override
fun
onRemoteInvitationCanceled
(
response
:
CallRemoteResponse
?)
{
//返回给被叫
LogUtil
.
e
(
"[agora]主叫${response?.callerId}已取消呼叫邀请"
)
AudioLogUtils
.
writeAgoraLog
(
"呼叫邀请被取消:主叫主动取消"
,
FILE_NAME
)
val
act
=
ActivityManager
.
getInstance
().
getTopTaskActivity
()
if
(
act
is
ConsultantAudioHomeActivity
)
{
act
.
uploadExceptionStatus
(
"对方已取消"
,
1
)
}
closePage
()
}
...
...
@@ -187,6 +198,10 @@ class YDLavManager {
LogUtil
.
e
(
"[agora]来自主叫${response?.callerId}的呼叫邀请进程失败:${response?.response}"
)
if
(
errorCode
==
RtmStatusCode
.
RemoteInvitationError
.
REMOTE_INVITATION_ERR_INVITATION_EXPIRE
)
{
//呼叫邀请过期
AudioLogUtils
.
writeAgoraLog
(
"呼叫邀请被取消:呼叫邀请过期"
,
FILE_NAME
)
val
act
=
ActivityManager
.
getInstance
().
getTopTaskActivity
()
if
(
act
is
ConsultantAudioHomeActivity
)
{
act
.
uploadExceptionStatus
(
"未接听"
,
3
)
}
}
else
{
AudioLogUtils
.
writeAgoraLog
(
"呼叫邀请被取消:错误原因(${errorCode})"
,
FILE_NAME
)
}
...
...
m-audioim/src/main/java/com/ydl/consultantim/ConsultantAudioHomeActivity.kt
View file @
381ea98e
...
...
@@ -867,6 +867,11 @@ class ConsultantAudioHomeActivity :
.
subscribe
()
}
fun
uploadExceptionStatus
(
msg
:
String
,
status
:
Int
)
{
callStatus
=
status
uploadException
(
msg
)
}
/**
* 上传错误日志
*/
...
...
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