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
7f08c113
Commit
7f08c113
authored
Sep 13, 2022
by
刘鹏
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'feat/qj/fix_2axb' into 'release'
补充埋点 See merge request app_android_lib/YDL-Component!369
parents
bdcb05d0
eeeab294
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
33 additions
and
9 deletions
+33
-9
AudioHomeActivity.kt
m-audioim/src/main/java/com/ydl/audioim/AudioHomeActivity.kt
+9
-4
YDLavManager.kt
m-audioim/src/main/java/com/ydl/audioim/YDLavManager.kt
+22
-5
AudioApiRequestUtil.kt
m-audioim/src/main/java/com/ydl/audioim/http/AudioApiRequestUtil.kt
+2
-0
No files found.
m-audioim/src/main/java/com/ydl/audioim/AudioHomeActivity.kt
View file @
7f08c113
...
...
@@ -30,10 +30,7 @@ import com.hjq.permissions.XXPermissions
import
com.ydl.audioim.bean.AgoraInvitationBean
import
com.ydl.audioim.bean.AgoraLogInfoBean
import
com.ydl.audioim.contract.IAudioHomeActivityContract
import
com.ydl.audioim.http.AudioApiRequestUtil
import
com.ydl.audioim.http.AudioNetAPi
import
com.ydl.audioim.http.LeaveChannelReason
import
com.ydl.audioim.http.RtcEvent
import
com.ydl.audioim.http.*
import
com.ydl.audioim.http.command.ConnectCommand
import
com.ydl.audioim.http.command.ConnectExceptionCommand
import
com.ydl.audioim.http.command.NoticePushCommand
...
...
@@ -259,16 +256,24 @@ class AudioHomeActivity :
if
(
fromUid
==
listenerUid
)
{
try
{
val
bean
=
Gson
().
fromJson
(
content
,
AgoraInvitationBean
::
class
.
java
)
var
desc
=
bean
.
callType
when
(
bean
.
callType
)
{
"2"
->
{
//接受
runOnUiThread
{
joinChannel
()
}
desc
=
"接受"
}
"4"
->
{
//拒绝
onCallRefused
()
desc
=
"拒绝"
}
}
AudioApiRequestUtil
.
reportCallEvent
(
channelId
,
IMEvent
(
IMEvent
.
Event
.
callNotificationReceived
),
errorReason
=
desc
)
}
catch
(
throwable
:
Throwable
)
{
LogUtil
.
e
(
throwable
.
message
)
}
...
...
m-audioim/src/main/java/com/ydl/audioim/YDLavManager.kt
View file @
7f08c113
...
...
@@ -285,17 +285,17 @@ class YDLavManager {
fun
rtcCall
(
listenerUid
:
String
?,
channelId
:
String
?,
sendDoctocrMsg
:
String
?)
{
YDLRTMClient
.
instances
.
call
(
listenerUid
,
channelId
,
sendDoctocrMsg
)
AudioApiRequestUtil
.
reportCallEvent
(
channelId
,
IMEvent
(
IMEvent
.
Event
.
startCall
))
sendCustomNotification
(
listenerUid
!!
,
sendDoctocrMsg
!!
,
"1"
)
sendCustomNotification
(
listenerUid
!!
,
sendDoctocrMsg
!!
,
"1"
,
channelId
)
}
fun
acceptCall
(
toUid
:
String
,
channelId
:
String
?,
data
:
String
)
{
YDLRTMClient
.
instances
.
acceptCall
(
channelId
)
sendCustomNotification
(
toUid
,
data
,
"2"
)
sendCustomNotification
(
toUid
,
data
,
"2"
,
channelId
)
}
fun
refuseCall
(
toUid
:
String
,
channelId
:
String
?,
data
:
String
)
{
YDLRTMClient
.
instances
.
refuseCall
(
channelId
)
sendCustomNotification
(
toUid
,
data
,
"4"
)
sendCustomNotification
(
toUid
,
data
,
"4"
,
channelId
)
}
fun
cancelCall
(
...
...
@@ -319,10 +319,10 @@ class YDLavManager {
callEndStatusUpdate
(
channelId
,
1
,
"主叫取消呼叫"
)
AudioApiRequestUtil
.
reportCallEvent
(
channelId
,
IMEvent
(
IMEvent
.
Event
.
callCancel
))
sendCustomNotification
(
listenerUid
,
data
,
"3"
)
sendCustomNotification
(
listenerUid
,
data
,
"3"
,
channelId
)
}
private
fun
sendCustomNotification
(
toUid
:
String
,
data
:
String
,
callType
:
String
)
{
private
fun
sendCustomNotification
(
toUid
:
String
,
data
:
String
,
callType
:
String
,
channelId
:
String
?
)
{
val
infoBean
=
AgoraInvitationBean
()
infoBean
.
data
=
data
infoBean
.
callType
=
callType
...
...
@@ -337,6 +337,13 @@ class YDLavManager {
AliYunLogConfig
.
YUNXIN
,
"云信发送通话邀请异常${throwable.message}"
)
if
(
callType
==
"1"
)
{
AudioApiRequestUtil
.
reportCallEvent
(
channelId
,
IMEvent
(
IMEvent
.
Event
.
callNotificationSend
),
errorReason
=
throwable
.
message
)
}
}
override
fun
onFailed
(
code
:
Int
)
{
...
...
@@ -346,6 +353,13 @@ class YDLavManager {
AliYunLogConfig
.
YUNXIN
,
"云信发送通话邀请失败${code}"
)
if
(
callType
==
"1"
)
{
AudioApiRequestUtil
.
reportCallEvent
(
channelId
,
IMEvent
(
IMEvent
.
Event
.
callNotificationSend
),
retCode
=
code
)
}
}
override
fun
onSuccess
()
{
...
...
@@ -358,6 +372,9 @@ class YDLavManager {
AliYunLogConfig
.
YUNXIN
,
"云信发送通话邀请成功"
)
if
(
callType
==
"1"
)
{
AudioApiRequestUtil
.
reportCallEvent
(
channelId
,
IMEvent
(
IMEvent
.
Event
.
callNotificationSend
))
}
}
})
},
300
)
...
...
m-audioim/src/main/java/com/ydl/audioim/http/AudioApiRequestUtil.kt
View file @
7f08c113
...
...
@@ -209,6 +209,8 @@ class IMEvent(event: Event) : CallEvent(EventType.IM, event.name, event.desc, ev
callSuccess
(
"呼叫成功"
,
REPORT_LEVEL_INFO
),
callFail
(
"呼叫失败"
,
REPORT_LEVEL_ERROR
),
callCancel
(
"呼叫取消"
,
REPORT_LEVEL_WARN
),
callNotificationSend
(
"补偿im发送"
,
REPORT_LEVEL_WARN
),
callNotificationReceived
(
"补偿im收到"
,
REPORT_LEVEL_WARN
),
}
}
...
...
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