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
869dcb6b
Commit
869dcb6b
authored
Mar 31, 2020
by
严久程
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
声网日志文件和路径更改
parent
a18c9d6a
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
43 additions
and
17 deletions
+43
-17
config.gradle
config.gradle
+3
-3
build.gradle
m-audioim/build.gradle
+1
-1
AudioHomeActivity.kt
m-audioim/src/main/java/com/ydl/audioim/AudioHomeActivity.kt
+30
-6
AudioLogUtils.kt
m-audioim/src/main/java/com/ydl/audioim/utils/AudioLogUtils.kt
+4
-4
ConsultantAudioHomeActivity.kt
m-audioim/src/main/java/com/ydl/consultantim/ConsultantAudioHomeActivity.kt
+3
-1
LogHelper.kt
ydl-platform/src/main/java/com/ydl/ydlcommon/utils/log/LogHelper.kt
+2
-2
No files found.
config.gradle
View file @
869dcb6b
...
...
@@ -42,7 +42,7 @@ ext {
ydlPublishVersion
=
[
// -------------- 业务模块 --------------
//第三步 若干
"m-confide"
:
"0.0.48.7.1
7
"
,
"m-confide"
:
"0.0.48.7.1
9
"
,
"m-consultant"
:
"0.0.57.4"
,
"m-fm"
:
"0.0.29.3"
,
"m-user"
:
"0.0.60.1"
,
...
...
@@ -75,7 +75,7 @@ ext {
"ydl-webview"
:
"0.0.38.24"
,
"ydl-media"
:
"0.0.20"
,
"ydl-pay"
:
"0.0.17"
,
"m-audioim"
:
"0.0.48.3.
6
"
,
"m-audioim"
:
"0.0.48.3.
8
"
,
"ydl-flutter-base"
:
"0.0.10.9"
,
//以下 几乎不会动
...
...
@@ -121,7 +121,7 @@ ext {
"ydl-webview"
:
"0.0.38.24"
,
"ydl-media"
:
"0.0.20"
,
"ydl-pay"
:
"0.0.17"
,
"m-audioim"
:
"0.0.48.3.
6
"
,
"m-audioim"
:
"0.0.48.3.
8
"
,
"ydl-flutter-base"
:
"0.0.10.9"
,
//以下 几乎不会动
...
...
m-audioim/build.gradle
View file @
869dcb6b
...
...
@@ -75,7 +75,7 @@ dependencies {
kapt
"com.alibaba:arouter-compiler:$arouter_compiler"
api
"com.alibaba:arouter-api:$arouter_api"
api
(
'com.ydl:ydl-av:1.2.
1
@aar'
){
api
(
'com.ydl:ydl-av:1.2.
4
@aar'
){
transitive
=
true
}
...
...
m-audioim/src/main/java/com/ydl/audioim/AudioHomeActivity.kt
View file @
869dcb6b
...
...
@@ -40,6 +40,7 @@ import com.ydl.webview.NewH5Activity
import
com.ydl.webview.RefreshWebEvent
import
com.ydl.ydl_av.chat.bean.AudioMessageBean
import
com.ydl.ydl_av.messge_service.YDLRTMClient
import
com.ydl.ydl_av.messge_service.callback.CancelCallStatusListener
import
com.ydl.ydl_av.voice.listener.IYDLVoiceEventHandler
import
com.ydl.ydl_av.voice.manager.YDLVoiceManager
import
com.ydl.ydl_image.config.SimpleImageOpConfiger
...
...
@@ -413,7 +414,7 @@ class AudioHomeActivity :
Observable
.
create
<
Any
>
{
try
{
val
content
=
Gson
().
toJson
(
logBean
)
AudioLogUtils
.
writeAgoraLog
(
content
)
AudioLogUtils
.
writeAgoraLog
(
content
,
"confide"
)
}
catch
(
e
:
Exception
)
{
}
}.
subscribeOn
(
Schedulers
.
io
())
...
...
@@ -639,20 +640,27 @@ class AudioHomeActivity :
}
},
{
LogUtil
.
d
(
it
.
message
)
}
,
{
}
)
{
waittingStatus
()
if
(!
isConnectSuccess
)
{
//关闭音乐
stopPlaying
()
//提示切换传统线路
//发送消息通知专家用户已挂断
YDLRTMClient
.
instances
.
cancelCall
(
listenerUid
,
channelId
)
YDLRTMClient
.
instances
.
cancelCall
(
listenerUid
,
channelId
,
object
:
CancelCallStatusListener
{
override
fun
onFailure
(
errorMsg
:
String
?,
errorCode
:
Int
)
{
YDLRTMClient
.
instances
.
cancelCall
(
listenerUid
,
channelId
,
null
)
}
override
fun
onSuccess
()
{
}
})
//通话结束或挂断时,上传日志文件
uploadLog
()
showChooseDialog
(
2
)
}
}
)
}
//双重保险:加入频道成功,通过服务端发推送给专家
noticeServerPush
(
true
)
...
...
@@ -695,7 +703,15 @@ class AudioHomeActivity :
*/
private
fun
userCloseCalling
()
{
//发送消息通知专家用户已挂断
YDLRTMClient
.
instances
.
cancelCall
(
listenerUid
,
channelId
)
//发送消息通知专家用户已挂断
YDLRTMClient
.
instances
.
cancelCall
(
listenerUid
,
channelId
,
object
:
CancelCallStatusListener
{
override
fun
onFailure
(
errorMsg
:
String
?,
errorCode
:
Int
)
{
YDLRTMClient
.
instances
.
cancelCall
(
listenerUid
,
channelId
,
null
)
}
override
fun
onSuccess
()
{
}
})
//通话结束或挂断时,上传日志文件
uploadLog
()
handler
!!
.
postDelayed
({
...
...
@@ -780,7 +796,15 @@ class AudioHomeActivity :
}
else
{
//未连接成功,切换axb时:需发送消息通知专家端用户已挂断
//发送消息通知专家用户已挂断
YDLRTMClient
.
instances
.
cancelCall
(
listenerUid
,
channelId
)
//发送消息通知专家用户已挂断
YDLRTMClient
.
instances
.
cancelCall
(
listenerUid
,
channelId
,
object
:
CancelCallStatusListener
{
override
fun
onFailure
(
errorMsg
:
String
?,
errorCode
:
Int
)
{
YDLRTMClient
.
instances
.
cancelCall
(
listenerUid
,
channelId
,
null
)
}
override
fun
onSuccess
()
{
}
})
leaveChannel
()
}
}
...
...
m-audioim/src/main/java/com/ydl/audioim/utils/AudioLogUtils.kt
View file @
869dcb6b
...
...
@@ -29,10 +29,10 @@ class AudioLogUtils {
@SuppressLint
(
"SimpleDateFormat"
)
private
val
format
=
SimpleDateFormat
(
"yyyy-MM-dd HH:mm:ss"
)
fun
writeAgoraLog
(
content
:
String
)
{
fun
writeAgoraLog
(
content
:
String
,
fileName
:
String
)
{
Observable
.
create
<
Any
>
{
try
{
writeLog
(
content
)
writeLog
(
content
,
fileName
)
if
(
BuildConfig
.
DEBUG
)
{
LogUtil
.
d
(
"writeLog_complete"
)
}
...
...
@@ -42,10 +42,10 @@ class AudioLogUtils {
.
subscribe
()
}
private
fun
writeLog
(
content
:
String
)
{
private
fun
writeLog
(
content
:
String
,
fileName
:
String
)
{
try
{
val
folder
=
getLogFolder
()
val
file
=
File
(
folder
,
"AgoraInfoLog"
)
val
file
=
File
(
folder
,
fileName
)
if
(!
file
.
exists
()
||
!
file
.
isFile
)
{
file
.
createNewFile
()
}
...
...
m-audioim/src/main/java/com/ydl/consultantim/ConsultantAudioHomeActivity.kt
View file @
869dcb6b
...
...
@@ -137,6 +137,8 @@ class ConsultantAudioHomeActivity :
//5s倒计时,5s后还是连接中,则直接关闭页面
connectingStatusWaitingTimeCount
()
tv_tips
.
visibility
=
View
.
INVISIBLE
}
}
...
...
@@ -897,7 +899,7 @@ class ConsultantAudioHomeActivity :
private
fun
writeAgoraLog
(
content
:
String
)
{
Observable
.
create
<
Any
>
{
try
{
AudioLogUtils
.
writeAgoraLog
(
content
)
AudioLogUtils
.
writeAgoraLog
(
content
,
"consult"
)
}
catch
(
e
:
Exception
)
{
}
}.
subscribeOn
(
Schedulers
.
io
())
...
...
ydl-platform/src/main/java/com/ydl/ydlcommon/utils/log/LogHelper.kt
View file @
869dcb6b
...
...
@@ -226,12 +226,12 @@ class LogHelper private constructor() {
//获取声网日志
private
fun
getAgoraLog
(
context
:
Context
):
File
{
val
agora
=
FileUtils
.
getSDDirectory
()
+
"/"
+
context
.
packageName
+
"/agorasdk.log"
//
val agora = FileUtils.getSDDirectory() + "/" + context.packageName + "/agorasdk.log"
val
filePath
=
context
.
filesDir
.
path
+
"/agorasdk.log"
return
File
(
agora
)
return
File
(
filePath
)
}
private
object
Holder
{
...
...
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