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
720dc764
Commit
720dc764
authored
Mar 17, 2021
by
YKai
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat:m-confide组件剩酒
parent
80424bdb
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
32 additions
and
7 deletions
+32
-7
config.gradle
config.gradle
+4
-4
YDLavManager.kt
m-audioim/src/main/java/com/ydl/audioim/YDLavManager.kt
+21
-2
ConfdieServiceImpl.kt
m-confide/src/main/java/com/ydl/confide/home/modular/service/ConfdieServiceImpl.kt
+7
-1
No files found.
config.gradle
View file @
720dc764
...
...
@@ -5,7 +5,7 @@ ext {
ydlPublishVersion
=
[
// -------------- 业务模块 --------------
//第三步 若干
"m-confide"
:
"0.0.48.9
7
"
,
"m-confide"
:
"0.0.48.9
9
"
,
"m-consultant"
:
"0.0.59.65"
,
"m-fm"
:
"0.0.30.01"
,
"m-user"
:
"0.0.61.10"
,
...
...
@@ -39,7 +39,7 @@ ext {
"ydl-webview"
:
"0.0.38.36"
,
"ydl-media"
:
"0.0.21.6"
,
"ydl-pay"
:
"0.0.18.13"
,
"m-audioim"
:
"0.0.49.29.2
7
"
,
"m-audioim"
:
"0.0.49.29.2
8
"
,
"ydl-flutter-base"
:
"0.0.14.20"
,
//以下 几乎不会动
...
...
@@ -88,7 +88,7 @@ ext {
// -------------- 业务模块 --------------
//第三步 若干
"m-confide"
:
"0.0.48.9
7
"
,
"m-confide"
:
"0.0.48.9
9
"
,
"m-consultant"
:
"0.0.59.65"
,
"m-fm"
:
"0.0.30.01"
,
"m-user"
:
"0.0.61.10"
,
...
...
@@ -120,7 +120,7 @@ ext {
"ydl-webview"
:
"0.0.38.36"
,
"ydl-media"
:
"0.0.21.6"
,
"ydl-pay"
:
"0.0.18.11"
,
"m-audioim"
:
"0.0.49.29.2
7
"
,
"m-audioim"
:
"0.0.49.29.2
8
"
,
"ydl-flutter-base"
:
"0.0.14.20"
,
//以下 几乎不会动
...
...
m-audioim/src/main/java/com/ydl/audioim/YDLavManager.kt
View file @
720dc764
...
...
@@ -22,10 +22,13 @@ import com.ydl.ydl_av.messge_service.callback.LoginCallback
import
com.ydl.ydl_av.messge_service.request.LoginParam
import
com.ydl.ydl_av.messge_service.response.CallLocalResponse
import
com.ydl.ydl_av.messge_service.response.CallRemoteResponse
import
com.ydl.ydlcommon.base.BaseApp
import
com.ydl.ydlcommon.modular.ModularServiceManager
import
com.ydl.ydlcommon.utils.ActivityManager
import
com.ydl.ydlcommon.utils.LogUtil
import
com.ydl.ydlcommon.utils.SharedPreferencesEditor
import
com.ydl.ydlcommon.utils.log.LogHelper
import
com.yidianling.common.tools.RxSPTool
import
com.yidianling.common.tools.ToastUtil
import
com.yidianling.im.api.bean.IMRegisterObserverCustomNotificationCallBack
import
com.yidianling.im.api.bean.IMSendCustomNotificationResultCallBack
...
...
@@ -58,6 +61,7 @@ class YDLavManager {
YDLavManager
()
}
const
val
AUDIO_NO_AUTH_ERROR_CODE
=
"97"
//音频权限未通过错误码
const
val
IS_ONLINE_RTM
=
"is_online_rtm"
// rtm是否在线
}
...
...
@@ -381,7 +385,7 @@ class YDLavManager {
//获取token
AudioApiRequestUtil
.
getAgoraToken
().
subscribeOn
(
Schedulers
.
io
())
.
observeOn
(
AndroidSchedulers
.
mainThread
()).
subscribe
({
if
(
"200"
.
equals
(
it
.
code
)
)
{
if
(
"200"
==
it
.
code
)
{
LogUtil
.
e
(
"[agora]登录av的login-uid:$userId"
)
YDLRTMClient
.
instances
.
login
(
LoginParam
(
userId
,
it
.
data
.
token
),
...
...
@@ -389,6 +393,7 @@ class YDLavManager {
override
fun
onSuccess
()
{
//登陆成功,发起呼叫
LogUtil
.
e
(
"[agora]实时消息登录成功"
)
RxSPTool
.
putBoolean
(
BaseApp
.
getApp
(),
IS_ONLINE_RTM
,
true
)
writeAgoraLog
(
"声网rtm登录成功,uid:$userId-------Time:${AudioLogUtils.format.format(Calendar.getInstance().time)}"
,
"confide.log"
,
true
)
event
(
true
,
""
)
}
...
...
@@ -465,13 +470,18 @@ class YDLavManager {
/**
* 退出登录
* @param
*/
fun
logout
(
)
{
private
fun
logout
(
isReLogin
:
Boolean
)
{
EventBus
.
getDefault
().
unregister
(
this
)
YDLRTMClient
.
instances
.
logout
(
object
:
LoginCallback
{
override
fun
onSuccess
()
{
//退出登陆成功
LogUtil
.
d
(
"[agora]实时消息退出成功"
)
RxSPTool
.
putBoolean
(
BaseApp
.
getApp
(),
IS_ONLINE_RTM
,
false
)
if
(
isReLogin
){
login
(
ModularServiceManager
.
provide
(
IUserService
::
class
.
java
).
getUserInfo
()
?.
uid
)
}
}
override
fun
onFailure
(
msg
:
String
?)
{
...
...
@@ -481,6 +491,13 @@ class YDLavManager {
}
/**
* 退出登录默认不重新登录
*/
fun
logout
(){
logout
(
false
)
}
/**
* RTM登录异常,上传错误日志 msg
* 声网出现异常,上传错误日志 connectException
*/
...
...
@@ -543,6 +560,8 @@ class YDLavManager {
* */
if
(
reason
==
CONNECTION_CHANGE_REASON_REMOTE_LOGIN
&&!
activityIsExists
(
ConsultantAudioHomeActivity
::
class
.
java
)&&!
activityIsExists
(
AudioHomeActivity
::
class
.
java
)){
logout
()
}
else
{
logout
(
true
)
}
}
}
...
...
m-confide/src/main/java/com/ydl/confide/home/modular/service/ConfdieServiceImpl.kt
View file @
720dc764
...
...
@@ -17,6 +17,8 @@ import com.ydl.webview.TellData
import
com.ydl.ydlcommon.base.BaseApp
import
com.ydl.ydlcommon.base.config.YDLConstants
import
com.ydl.ydlcommon.utils.YDLCacheUtils
import
com.yidianling.common.tools.RxSPTool
import
com.yidianling.common.tools.ToastUtil
/**
* Created by haorui on 2019-12-11 .
...
...
@@ -50,7 +52,11 @@ class ConfdieServiceImpl : IConfideService {
}
override
fun
connectionJava
(
id
:
Int
,
type
:
Int
,
activity
:
Activity
,
tellData
:
String
?,
callType
:
String
?)
{
var
myTellData
:
TellData
?
=
if
(
tellData
==
null
)
null
else
Gson
().
fromJson
(
tellData
,
TellData
::
class
.
java
)
if
(!
RxSPTool
.
getBoolean
(
BaseApp
.
getApp
(),
YDLavManager
.
IS_ONLINE_RTM
)){
ToastUtil
.
toastShort
(
"网络通话错误代码001"
)
return
}
val
myTellData
:
TellData
?
=
if
(
tellData
==
null
)
null
else
Gson
().
fromJson
(
tellData
,
TellData
::
class
.
java
)
ConfideWebServiceImpl
().
connectionJava
(
id
,
type
,
activity
,
myTellData
,
callType
)
}
...
...
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