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
8571b087
Commit
8571b087
authored
Apr 15, 2020
by
严久程
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
声网
parent
d1b6ff4d
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
56 additions
and
33 deletions
+56
-33
config.gradle
config.gradle
+3
-3
AudioHomeActivity.kt
m-audioim/src/main/java/com/ydl/audioim/AudioHomeActivity.kt
+53
-30
No files found.
config.gradle
View file @
8571b087
...
...
@@ -42,7 +42,7 @@ ext {
ydlPublishVersion
=
[
// -------------- 业务模块 --------------
//第三步 若干
"m-confide"
:
"0.0.48.
19
"
,
"m-confide"
:
"0.0.48.
20
"
,
"m-consultant"
:
"0.0.59.7"
,
"m-fm"
:
"0.0.29.3"
,
"m-user"
:
"0.0.60.4"
,
...
...
@@ -75,7 +75,7 @@ ext {
"ydl-webview"
:
"0.0.38.29"
,
"ydl-media"
:
"0.0.20"
,
"ydl-pay"
:
"0.0.17"
,
"m-audioim"
:
"0.0.48.
7
"
,
"m-audioim"
:
"0.0.48.
8
"
,
"ydl-flutter-base"
:
"0.0.14.12"
,
//以下 几乎不会动
...
...
@@ -121,7 +121,7 @@ ext {
"ydl-webview"
:
"0.0.38.29"
,
"ydl-media"
:
"0.0.20"
,
"ydl-pay"
:
"0.0.17"
,
"m-audioim"
:
"0.0.48.
7
"
,
"m-audioim"
:
"0.0.48.
8
"
,
"ydl-flutter-base"
:
"0.0.10.9"
,
//以下 几乎不会动
...
...
m-audioim/src/main/java/com/ydl/audioim/AudioHomeActivity.kt
View file @
8571b087
...
...
@@ -414,7 +414,7 @@ class AudioHomeActivity :
private
fun
reLoginRTM
()
{
writeAgoraLog
(
"RMT状态:${YDLavManager.sdkStatus},重新登录RMT"
)
val
uid
=
YdlCommonRouterManager
.
getYdlCommonRoute
().
getUid
().
toString
()
val
uid
=
YdlCommonRouterManager
.
getYdlCommonRoute
().
getUid
().
toString
()
YDLavManager
.
instances
.
login
(
uid
)
{
_isSuccess
,
_msg
->
writeAgoraLog
(
"登录RTM的uid=${uid}"
)
val
result
=
if
(
_isSuccess
)
"RMT登录成功"
else
"RMT登录失败:$_msg"
...
...
@@ -571,14 +571,17 @@ class AudioHomeActivity :
writeAgoraLog
(
"未接通挂断:60s等待倒计时结束挂断"
)
//提示切换传统线路
//发送消息通知专家用户已挂断
YDLRTMClient
.
instances
.
cancelCall
(
listenerUid
,
channelId
,
object
:
CancelCallStatusListener
{
override
fun
onFailure
(
errorMsg
:
String
?,
errorCode
:
Int
)
{
YDLRTMClient
.
instances
.
cancelCall
(
listenerUid
,
channelId
,
null
)
}
override
fun
onSuccess
()
{
}
})
YDLRTMClient
.
instances
.
cancelCall
(
listenerUid
,
channelId
,
object
:
CancelCallStatusListener
{
override
fun
onFailure
(
errorMsg
:
String
?,
errorCode
:
Int
)
{
YDLRTMClient
.
instances
.
cancelCall
(
listenerUid
,
channelId
,
null
)
}
override
fun
onSuccess
()
{
}
})
//通话结束或挂断时,上传日志文件
uploadLog
()
...
...
@@ -628,21 +631,29 @@ class AudioHomeActivity :
*/
private
fun
userCloseCalling
()
{
writeAgoraLog
(
"未接听时:主叫主动挂断,取消呼叫"
)
//发送消息通知专家用户已挂断
YDLRTMClient
.
instances
.
cancelCall
(
listenerUid
,
channelId
,
object
:
CancelCallStatusListener
{
override
fun
onFailure
(
errorMsg
:
String
?,
errorCode
:
Int
)
{
writeAgoraLog
(
"未接听时:主叫主动挂断失败,msg=$errorMsg($errorCode),再次挂断"
)
YDLRTMClient
.
instances
.
cancelCall
(
listenerUid
,
channelId
,
null
)
}
override
fun
onSuccess
()
{
}
})
//通话结束或挂断时,上传日志文件
uploadLog
()
handler
!!
.
postDelayed
({
leaveChannel
()
},
100
)
//发送消息通知专家用户已挂断
//通话结束或挂断时,上传日志文件
uploadLog
()
handler
!!
.
postDelayed
({
YDLRTMClient
.
instances
.
cancelCall
(
listenerUid
,
channelId
,
object
:
CancelCallStatusListener
{
override
fun
onFailure
(
errorMsg
:
String
?,
errorCode
:
Int
)
{
writeAgoraLog
(
"未接听时:主叫主动挂断失败,msg=$errorMsg($errorCode),再次挂断"
)
YDLRTMClient
.
instances
.
cancelCall
(
listenerUid
,
channelId
,
null
)
}
override
fun
onSuccess
()
{
}
})
},
500
)
}
/**
...
...
@@ -728,15 +739,21 @@ class AudioHomeActivity :
//未连接成功,切换axb时:需发送消息通知专家端用户已挂断
//发送消息通知专家用户已挂断
//发送消息通知专家用户已挂断
YDLRTMClient
.
instances
.
cancelCall
(
listenerUid
,
channelId
,
object
:
CancelCallStatusListener
{
override
fun
onFailure
(
errorMsg
:
String
?,
errorCode
:
Int
)
{
YDLRTMClient
.
instances
.
cancelCall
(
listenerUid
,
channelId
,
null
)
}
override
fun
onSuccess
()
{
}
})
leaveChannel
()
handler
!!
.
postDelayed
({
YDLRTMClient
.
instances
.
cancelCall
(
listenerUid
,
channelId
,
object
:
CancelCallStatusListener
{
override
fun
onFailure
(
errorMsg
:
String
?,
errorCode
:
Int
)
{
writeAgoraLog
(
"未接听时:主叫主动挂断失败,msg=$errorMsg($errorCode),再次挂断"
)
YDLRTMClient
.
instances
.
cancelCall
(
listenerUid
,
channelId
,
null
)
}
override
fun
onSuccess
()
{
}
})
},
200
)
}
}
...
...
@@ -1091,16 +1108,22 @@ class AudioHomeActivity :
* 上传错误日志
* zhu 洪平要的,判别是移动端主动调的还是声网返的
*/
private
fun
uploadException
(
message
:
String
,
zhu
:
String
=
""
,
eventType
:
String
=
"99"
,
callback
:
YDLavManager
.
UploadExceptionCallback
?)
{
private
fun
uploadException
(
message
:
String
,
zhu
:
String
=
""
,
eventType
:
String
=
"99"
,
callback
:
YDLavManager
.
UploadExceptionCallback
?
)
{
var
time
:
String
=
(
System
.
currentTimeMillis
()
/
1000
).
toString
()
var
uid
:
String
=
ModularServiceManager
.
provide
(
IUserService
::
class
.
java
).
getUserInfo
()
?.
uid
!!
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
)
YDLavManager
.
instances
.
uploadException
(
connectException
,
callback
)
}
fun
writeAgoraLog
(
content
:
String
,
isAppend
:
Boolean
=
true
)
{
fun
writeAgoraLog
(
content
:
String
,
isAppend
:
Boolean
=
true
)
{
try
{
AudioLogUtils
.
writeAgoraLog
(
content
,
"confide"
,
isAppend
)
}
catch
(
e
:
Exception
)
{
...
...
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