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
220aae18
Commit
220aae18
authored
Jul 26, 2022
by
YKai
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: audioim和m-confide组件耦合拆分
parent
c51351ef
Hide whitespace changes
Inline
Side-by-side
Showing
16 changed files
with
152 additions
and
141 deletions
+152
-141
build.gradle
api/audioim/build.gradle
+10
-15
IAudioImService.kt
api/audioim/src/main/java/com/ydl/audioim/api/IAudioImService.kt
+43
-0
ExpertInfoBean.java
api/audioim/src/main/java/com/ydl/audioim/bean/ExpertInfoBean.java
+1
-1
IntentConstants.java
api/audioim/src/main/java/com/ydl/audioim/listener/IntentConstants.java
+1
-1
build.gradle
m-audioim/build.gradle
+1
-0
AudioHomeActivity.kt
m-audioim/src/main/java/com/ydl/audioim/AudioHomeActivity.kt
+1
-0
IntentConstants.java
m-audioim/src/main/java/com/ydl/audioim/IntentConstants.java
+0
-26
YDLavManager.kt
m-audioim/src/main/java/com/ydl/audioim/YDLavManager.kt
+1
-1
ExpertInfoBean.java
m-audioim/src/main/java/com/ydl/audioim/bean/ExpertInfoBean.java
+0
-38
AudioImServiceImp.kt
m-audioim/src/main/java/com/ydl/audioim/modular/AudioImServiceImp.kt
+62
-0
readme.md
m-audioim/src/main/java/com/ydl/audioim/readme.md
+0
-2
build.gradle
m-confide/build.gradle
+1
-1
ConfideHomeActivity.kt
m-confide/src/main/java/com/ydl/confide/home/ConfideHomeActivity.kt
+6
-5
ConfdieServiceImpl.kt
m-confide/src/main/java/com/ydl/confide/home/modular/service/ConfdieServiceImpl.kt
+11
-24
ConfideWebServiceImpl.kt
m-confide/src/main/java/com/ydl/confide/home/modular/service/ConfideWebServiceImpl.kt
+10
-24
ItemIntroHolder.kt
m-confide/src/main/java/com/ydl/confide/intro/ItemIntroHolder.kt
+4
-3
No files found.
api/audioim/build.gradle
View file @
220aae18
plugins
{
apply
plugin:
'com.android.library'
id
'com.android.library'
apply
plugin:
'kotlin-android'
id
'org.jetbrains.kotlin.android'
apply
from:
"../../publish.gradle"
}
android
{
android
{
compileSdk
32
compileSdkVersion
rootProject
.
ext
.
android
[
"compileSdkVersion"
]
buildToolsVersion
rootProject
.
ext
.
android
[
"buildToolsVersion"
]
defaultConfig
{
defaultConfig
{
minSdk
21
minSdk
Version
rootProject
.
ext
.
android
[
"minSdkVersion"
]
targetSdk
32
targetSdk
Version
rootProject
.
ext
.
android
[
"targetSdkVersion"
]
testInstrumentationRunner
"androidx.test.runner.AndroidJUnitRunner"
consumerProguardFiles
"consumer-rules.pro"
}
}
buildTypes
{
buildTypes
{
...
@@ -31,10 +29,6 @@ android {
...
@@ -31,10 +29,6 @@ android {
dependencies
{
dependencies
{
implementation
'androidx.core:core-ktx:1.7.0'
implementation
"com.alibaba:arouter-api:$arouter_api"
implementation
'androidx.appcompat:appcompat:1.3.0'
implementation
"org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
implementation
'com.google.android.material:material:1.4.0'
testImplementation
'junit:junit:4.13.2'
androidTestImplementation
'androidx.test.ext:junit:1.1.3'
androidTestImplementation
'androidx.test.espresso:espresso-core:3.4.0'
}
}
\ No newline at end of file
api/audioim/src/main/java/com/ydl/audioim/api/IAudioImService.kt
0 → 100644
View file @
220aae18
package
com.ydl.audioim.api
import
android.app.Activity
import
android.content.Context
import
com.alibaba.android.arouter.facade.template.IProvider
/**
* Created by Ykai on 2022/7/26.
*/
interface
IAudioImService
:
IProvider
{
/**
* YDLavManager初始化方法
*/
fun
yDLAvManagerInit
(
context
:
Context
,
appId
:
String
)
/**
* 获取rtm是否在线
*/
fun
getIsOnlineRtm
():
Boolean
/**
* rtm登录返回并登录状态
*/
fun
loginRtm
(
userId
:
String
?,
event
:
(
isSuccess
:
Boolean
,
msg
:
String
?)
->
Unit
)
/**
* rtm登录
*/
fun
loginRtm
(
userId
:
String
?)
/**
* 拨打语音电话转axb弹窗
*/
fun
openAxbDialog
(
activity
:
Activity
?,
type
:
Int
,
phoneNumber
:
String
?)
/**
* 事件上报
*/
fun
callEventSave
(
status
:
String
,
res
:
String
,
session
:
String
?,
line
:
String
)
}
\ No newline at end of file
api/audioim/src/main/java/com/ydl/audioim/
api/
bean/ExpertInfoBean.java
→
api/audioim/src/main/java/com/ydl/audioim/bean/ExpertInfoBean.java
View file @
220aae18
package
com
.
ydl
.
audioim
.
api
.
bean
;
package
com
.
ydl
.
audioim
.
bean
;
/**
/**
* @author jiucheng
* @author jiucheng
...
...
api/audioim/src/main/java/com/ydl/audioim/
api/
listener/IntentConstants.java
→
api/audioim/src/main/java/com/ydl/audioim/listener/IntentConstants.java
View file @
220aae18
package
com
.
ydl
.
audioim
.
api
.
listener
;
package
com
.
ydl
.
audioim
.
listener
;
/**
/**
* @author jiucheng
* @author jiucheng
...
...
m-audioim/build.gradle
View file @
220aae18
...
@@ -75,4 +75,5 @@ dependencies {
...
@@ -75,4 +75,5 @@ dependencies {
api
project
(
':ydl-webview'
)
api
project
(
':ydl-webview'
)
implementation
project
(
":api:user"
)
implementation
project
(
":api:user"
)
implementation
project
(
":api:im"
)
implementation
project
(
":api:im"
)
implementation
project
(
":api:audioim"
)
}
}
m-audioim/src/main/java/com/ydl/audioim/AudioHomeActivity.kt
View file @
220aae18
...
@@ -32,6 +32,7 @@ import com.ydl.audioim.http.command.ConnectCommand
...
@@ -32,6 +32,7 @@ import com.ydl.audioim.http.command.ConnectCommand
import
com.ydl.audioim.http.command.ConnectExceptionCommand
import
com.ydl.audioim.http.command.ConnectExceptionCommand
import
com.ydl.audioim.http.command.NoticePushCommand
import
com.ydl.audioim.http.command.NoticePushCommand
import
com.ydl.audioim.http.command.PayLoad
import
com.ydl.audioim.http.command.PayLoad
import
com.ydl.audioim.listener.IntentConstants
import
com.ydl.audioim.player.AudioPlayer
import
com.ydl.audioim.player.AudioPlayer
import
com.ydl.audioim.presenter.AudioHomePresenterImpl
import
com.ydl.audioim.presenter.AudioHomePresenterImpl
import
com.ydl.audioim.router.AudioImIn
import
com.ydl.audioim.router.AudioImIn
...
...
m-audioim/src/main/java/com/ydl/audioim/IntentConstants.java
deleted
100644 → 0
View file @
c51351ef
package
com
.
ydl
.
audioim
;
/**
* @author jiucheng
* @描述:页面参数传递常量
* @Copyright Copyright (c) 2018
* @Company 壹点灵
* @date 2018/11/7
*/
public
interface
IntentConstants
{
String
INTENT_EXPERT_HEAD_URL
=
"intent_expert_head_url"
;
String
INTENT_EXPERT_NAME
=
"intent_expert_name"
;
String
INTENT_EXPERT_TIPS
=
"intent_expert_tips"
;
String
INTENT_ROOM_ID
=
"intent_room_id"
;
String
INTENT_REMAIN_TIME
=
"intent_remain_time"
;
String
INTENT_RELATION_ID
=
"intent_relation_id"
;
String
INTENT_CALL_ID
=
"INTENT_CALL_ID"
;
String
INTENT_TOKEN
=
"intent_token"
;
String
INTENT_SIGNAL_TOKEN
=
"intent_signal_token"
;
String
INTENT_LISTENER_UID
=
"intent_listener_uid"
;
String
INTENT_TOTAL_DURATION
=
"intent_total_duration"
;
String
INTENT_LISTEN_ID
=
"intent_listen_id"
;
String
INTENT_COMMENT_URL
=
"intent_comment_url"
;
String
INTENT_ISSHOWAXB
=
"intent_isshowaxb"
;
String
INTENT_DIALSTATUS
=
"intent_dialstatus"
;
}
m-audioim/src/main/java/com/ydl/audioim/YDLavManager.kt
View file @
220aae18
...
@@ -398,7 +398,7 @@ class YDLavManager {
...
@@ -398,7 +398,7 @@ class YDLavManager {
@SuppressLint
(
"CheckResult"
)
@SuppressLint
(
"CheckResult"
)
fun
login
(
userId
:
String
?,
event
:
(
isSuccess
:
Boolean
,
msg
:
String
?)
->
Unit
)
{
fun
login
(
userId
:
String
?,
event
:
(
isSuccess
:
Boolean
,
msg
:
String
?)
->
Unit
)
{
if
(
TextUtils
.
isEmpty
(
userId
)
||
userId
?:
"0"
<=
"0"
)
{
if
(
TextUtils
.
isEmpty
(
userId
)
||
(
userId
?:
"0"
)
<=
"0"
)
{
//如果uid为空或小于等于0 ,则不进行登录,因为uid为0也会登录成功,会导致后面uid正确时无法登录
//如果uid为空或小于等于0 ,则不进行登录,因为uid为0也会登录成功,会导致后面uid正确时无法登录
LogUtil
.
e
(
"[agora]login-uid:$userId"
)
LogUtil
.
e
(
"[agora]login-uid:$userId"
)
AliYunRichLogsHelper
.
getInstance
()
AliYunRichLogsHelper
.
getInstance
()
...
...
m-audioim/src/main/java/com/ydl/audioim/bean/ExpertInfoBean.java
deleted
100644 → 0
View file @
c51351ef
package
com
.
ydl
.
audioim
.
bean
;
/**
* @author jiucheng
* @描述:
* @Copyright Copyright (c) 2018
* @Company 壹点灵
* @date 2018/11/10
*/
public
class
ExpertInfoBean
{
public
String
expertHeadUrl
;
public
String
expertName
;
public
String
expertTips
;
public
String
token
;
public
String
signalToken
;
public
String
listenerUid
;
public
int
listenerStatus
;
public
String
listenerIsOpen
;
public
String
listenOrderStatus
;
public
String
channelId
;
public
ExpertInfoBean
.
ListenRemainingTime
remainingTime
;
public
String
totalDuration
;
public
String
commentUrl
;
public
ExpertInfoBean
()
{
}
public
static
class
ListenRemainingTime
{
public
String
remainingTime
;
public
ListenRemainingTime
()
{
}
public
ListenRemainingTime
(
String
remainingTime
)
{
this
.
remainingTime
=
remainingTime
;
}
}
}
m-audioim/src/main/java/com/ydl/audioim/modular/AudioImServiceImp.kt
0 → 100644
View file @
220aae18
package
com.ydl.audioim.modular
import
android.app.Activity
import
android.content.Context
import
android.content.Intent
import
android.net.Uri
import
com.alibaba.android.arouter.facade.annotation.Route
import
com.ydl.audioim.YDLavManager
import
com.ydl.audioim.api.IAudioImService
import
com.ydl.audioim.widget.AxbConfirmDialog
/**
* Created by Ykai on 2022/7/26.
*/
@Route
(
path
=
"/audioim/AudioImService"
)
class
AudioImServiceImp
:
IAudioImService
{
override
fun
yDLAvManagerInit
(
context
:
Context
,
appId
:
String
)
{
YDLavManager
.
instances
.
init
(
context
,
appId
)
}
override
fun
getIsOnlineRtm
():
Boolean
{
return
YDLavManager
.
isOnlineRtm
}
override
fun
loginRtm
(
userId
:
String
?,
event
:
(
isSuccess
:
Boolean
,
msg
:
String
?)
->
Unit
)
{
YDLavManager
.
instances
.
login
(
userId
)
{
success
:
Boolean
,
_
->
event
(
success
,
""
)
}
}
override
fun
loginRtm
(
userId
:
String
?)
{
YDLavManager
.
instances
.
login
(
userId
)
}
override
fun
openAxbDialog
(
activity
:
Activity
?,
type
:
Int
,
phoneNumber
:
String
?)
{
val
dialog
=
AxbConfirmDialog
(
activity
,
type
,
object
:
AxbConfirmDialog
.
OnClickEnsureListener
{
override
fun
onClickEnsure
()
{
phoneNumber
?.
let
{
val
phoneIntent
=
Intent
(
Intent
.
ACTION_DIAL
,
Uri
.
parse
(
"tel:$phoneNumber"
))
activity
?.
startActivity
(
phoneIntent
)
}
}
override
fun
onClose
()
{
}
})
dialog
.
show
()
}
override
fun
callEventSave
(
status
:
String
,
res
:
String
,
session
:
String
?,
line
:
String
)
{
YDLavManager
.
instances
.
callEventSave
(
status
,
res
,
session
,
line
)
}
override
fun
init
(
context
:
Context
?)
{
}
}
\ No newline at end of file
m-audioim/src/main/java/com/ydl/audioim/readme.md
deleted
100644 → 0
View file @
c51351ef
# 声网module
\ No newline at end of file
m-confide/build.gradle
View file @
220aae18
...
@@ -71,10 +71,10 @@ dependencies {
...
@@ -71,10 +71,10 @@ dependencies {
api
rootProject
.
ext
.
dependencies
[
"ydl-user-router"
]
api
rootProject
.
ext
.
dependencies
[
"ydl-user-router"
]
api
project
(
':ydl-media'
)
api
project
(
':ydl-media'
)
api
project
(
':ydl-platform'
)
api
project
(
':ydl-platform'
)
api
project
(
':m-audioim'
)
api
project
(
":ydl-pay"
)
api
project
(
":ydl-pay"
)
api
project
(
':ydl-webview'
)
api
project
(
':ydl-webview'
)
api
project
(
':ydl-utils'
)
api
project
(
':ydl-utils'
)
implementation
project
(
":api:audioim"
)
implementation
project
(
":api:im"
)
implementation
project
(
":api:im"
)
implementation
project
(
":api:user"
)
implementation
project
(
":api:user"
)
implementation
project
(
":api:consultant"
)
implementation
project
(
":api:consultant"
)
...
...
m-confide/src/main/java/com/ydl/confide/home/ConfideHomeActivity.kt
View file @
220aae18
package
com.ydl.confide.home
package
com.ydl.confide.home
import
android.annotation.SuppressLint
import
android.annotation.SuppressLint
import
android.app.Activity
import
android.content.Context
import
android.content.Context
import
android.content.Intent
import
android.content.Intent
import
android.graphics.Color
import
android.graphics.Color
...
@@ -24,7 +25,7 @@ import com.facebook.drawee.backends.pipeline.Fresco
...
@@ -24,7 +25,7 @@ import com.facebook.drawee.backends.pipeline.Fresco
import
com.facebook.drawee.interfaces.DraweeController
import
com.facebook.drawee.interfaces.DraweeController
import
com.jcodecraeer.xrecyclerview.ProgressStyle
import
com.jcodecraeer.xrecyclerview.ProgressStyle
import
com.jcodecraeer.xrecyclerview.XRecyclerView
import
com.jcodecraeer.xrecyclerview.XRecyclerView
import
com.ydl.audioim.
YDLavManager
import
com.ydl.audioim.
api.IAudioImService
import
com.ydl.confide.R
import
com.ydl.confide.R
import
com.ydl.confide.api.ConfideRoute
import
com.ydl.confide.api.ConfideRoute
import
com.ydl.confide.home.adapter.ConfideHomeAdapter
import
com.ydl.confide.home.adapter.ConfideHomeAdapter
...
@@ -51,6 +52,7 @@ import com.ydl.webview.NewH5Activity
...
@@ -51,6 +52,7 @@ import com.ydl.webview.NewH5Activity
import
com.ydl.ydl_image.listener.YDLImageRecyclerOnScrollListener
import
com.ydl.ydl_image.listener.YDLImageRecyclerOnScrollListener
import
com.ydl.ydlcommon.base.config.HttpConfig
import
com.ydl.ydlcommon.base.config.HttpConfig
import
com.ydl.ydlcommon.base.config.HttpConfig.Companion.YDL_H5
import
com.ydl.ydlcommon.base.config.HttpConfig.Companion.YDL_H5
import
com.ydl.ydlcommon.modular.ModularServiceManager
import
com.ydl.ydlcommon.modular.findRouteService
import
com.ydl.ydlcommon.modular.findRouteService
import
com.ydl.ydlcommon.mvp.lce.BaseLceActivity
import
com.ydl.ydlcommon.mvp.lce.BaseLceActivity
import
com.ydl.ydlcommon.router.IYDLRouterConstant
import
com.ydl.ydlcommon.router.IYDLRouterConstant
...
@@ -60,6 +62,7 @@ import com.ydl.ydlcommon.view.DrawableRightTextView
...
@@ -60,6 +62,7 @@ import com.ydl.ydlcommon.view.DrawableRightTextView
import
com.ydl.ydlcommon.view.WrapContentLinearLayoutManager
import
com.ydl.ydlcommon.view.WrapContentLinearLayoutManager
import
com.yidianling.common.tools.RxImageTool
import
com.yidianling.common.tools.RxImageTool
import
com.yidianling.common.tools.ToastUtil
import
com.yidianling.common.tools.ToastUtil
import
com.yidianling.consultant.api.IConsultantService
import
com.yidianling.im.api.service.IImService
import
com.yidianling.im.api.service.IImService
import
com.yidianling.user.api.service.IUserService
import
com.yidianling.user.api.service.IUserService
import
kotlinx.android.synthetic.main.confide_home_activity.*
import
kotlinx.android.synthetic.main.confide_home_activity.*
...
@@ -248,10 +251,8 @@ class ConfideHomeActivity :
...
@@ -248,10 +251,8 @@ class ConfideHomeActivity :
}
}
if
(!
confidedId
.
isNullOrBlank
()
&&
!
doctorId
.
isNullOrBlank
())
{
if
(!
confidedId
.
isNullOrBlank
()
&&
!
doctorId
.
isNullOrBlank
())
{
if
(!
YDLavManager
.
isOnlineRtm
)
{
if
(!
ModularServiceManager
.
provide
(
IAudioImService
::
class
.
java
).
getIsOnlineRtm
())
{
YDLavManager
.
instances
.
login
(
ModularServiceManager
.
provide
(
IAudioImService
::
class
.
java
).
loginRtm
(
PhoneCallIn
.
getUserService
().
getUserInfo
()
?.
uid
)
{
_
:
Boolean
,
_
->
PhoneCallIn
.
getUserService
().
getUserInfo
()
?.
uid
)
{
_
:
Boolean
,
_
->
showPayOrDetail
(
confidedId
,
doctorId
)
showPayOrDetail
(
confidedId
,
doctorId
)
}
}
}
else
{
}
else
{
...
...
m-confide/src/main/java/com/ydl/confide/home/modular/service/ConfdieServiceImpl.kt
View file @
220aae18
...
@@ -4,14 +4,12 @@ import android.app.Activity
...
@@ -4,14 +4,12 @@ import android.app.Activity
import
android.app.Application
import
android.app.Application
import
android.content.Context
import
android.content.Context
import
android.content.Intent
import
android.content.Intent
import
android.net.Uri
import
android.text.TextUtils
import
android.text.TextUtils
import
androidx.fragment.app.DialogFragment
import
androidx.fragment.app.DialogFragment
import
androidx.fragment.app.FragmentActivity
import
androidx.fragment.app.FragmentActivity
import
com.alibaba.android.arouter.facade.annotation.Route
import
com.alibaba.android.arouter.facade.annotation.Route
import
com.google.gson.Gson
import
com.google.gson.Gson
import
com.ydl.audioim.YDLavManager
import
com.ydl.audioim.api.IAudioImService
import
com.ydl.audioim.widget.AxbConfirmDialog
import
com.ydl.confide.api.IConfideService
import
com.ydl.confide.api.IConfideService
import
com.ydl.confide.home.ConfideBottomSheetDialogFragment
import
com.ydl.confide.home.ConfideBottomSheetDialogFragment
import
com.ydl.confide.home.ConfideHomeActivity
import
com.ydl.confide.home.ConfideHomeActivity
...
@@ -20,6 +18,7 @@ import com.ydl.confide.home.bean.ConfideConnectResponse
...
@@ -20,6 +18,7 @@ import com.ydl.confide.home.bean.ConfideConnectResponse
import
com.ydl.webview.TellData
import
com.ydl.webview.TellData
import
com.ydl.ydlcommon.base.BaseApp
import
com.ydl.ydlcommon.base.BaseApp
import
com.ydl.ydlcommon.base.config.YDLConstants
import
com.ydl.ydlcommon.base.config.YDLConstants
import
com.ydl.ydlcommon.modular.ModularServiceManager
import
com.ydl.ydlcommon.utils.YDLCacheUtils
import
com.ydl.ydlcommon.utils.YDLCacheUtils
/**
/**
...
@@ -73,7 +72,7 @@ class ConfdieServiceImpl : IConfideService {
...
@@ -73,7 +72,7 @@ class ConfdieServiceImpl : IConfideService {
override
fun
ydlAvManagerLogin
(
uid
:
String
?)
{
override
fun
ydlAvManagerLogin
(
uid
:
String
?)
{
YDLavManager
.
instances
.
login
(
uid
)
ModularServiceManager
.
provide
(
IAudioImService
::
class
.
java
).
loginRtm
(
uid
)
}
}
override
fun
startCondifeHomePage
(
context
:
Context
,
isSplash
:
Boolean
)
{
override
fun
startCondifeHomePage
(
context
:
Context
,
isSplash
:
Boolean
)
{
...
@@ -91,17 +90,17 @@ class ConfdieServiceImpl : IConfideService {
...
@@ -91,17 +90,17 @@ class ConfdieServiceImpl : IConfideService {
//debug包根据url判断使用正式或者测试key
//debug包根据url判断使用正式或者测试key
val
cacheAppEnv
=
YDLCacheUtils
.
getCacheApi
()
val
cacheAppEnv
=
YDLCacheUtils
.
getCacheApi
()
if
(!
TextUtils
.
isEmpty
(
cacheAppEnv
))
{
avManagerKey
=
if
(!
TextUtils
.
isEmpty
(
cacheAppEnv
))
{
if
(
YDLConstants
.
ENV_TEST
==
cacheAppEnv
)
{
if
(
YDLConstants
.
ENV_TEST
==
cacheAppEnv
)
{
avManagerKey
=
"13b1536698f64905a1e7e5bb978ba821"
"13b1536698f64905a1e7e5bb978ba821"
}
else
{
}
else
{
avManagerKey
=
"3387e9b251f3491e9221a9877e8f7830"
"3387e9b251f3491e9221a9877e8f7830"
}
}
}
else
{
}
else
{
if
(
YDLConstants
.
ENV_TEST
==
appEnv
||
YDLConstants
.
ENV_AUTO_TEST
==
appEnv
)
{
if
(
YDLConstants
.
ENV_TEST
==
appEnv
||
YDLConstants
.
ENV_AUTO_TEST
==
appEnv
)
{
avManagerKey
=
"13b1536698f64905a1e7e5bb978ba821"
"13b1536698f64905a1e7e5bb978ba821"
}
else
{
}
else
{
avManagerKey
=
"3387e9b251f3491e9221a9877e8f7830"
"3387e9b251f3491e9221a9877e8f7830"
}
}
}
}
}
else
{
}
else
{
...
@@ -109,27 +108,15 @@ class ConfdieServiceImpl : IConfideService {
...
@@ -109,27 +108,15 @@ class ConfdieServiceImpl : IConfideService {
avManagerKey
=
"3387e9b251f3491e9221a9877e8f7830"
avManagerKey
=
"3387e9b251f3491e9221a9877e8f7830"
}
}
YDLavManager
.
instances
.
init
(
app
,
avManagerKey
)
ModularServiceManager
.
provide
(
IAudioImService
::
class
.
java
).
yDLAvManagerInit
(
app
,
avManagerKey
)
}
}
override
fun
isOnlineRtm
():
Boolean
{
override
fun
isOnlineRtm
():
Boolean
{
return
YDLavManager
.
isOnlineRtm
return
ModularServiceManager
.
provide
(
IAudioImService
::
class
.
java
).
getIsOnlineRtm
()
}
}
override
fun
showAxbConfirmDialog
(
activity
:
Activity
?,
type
:
Int
,
phoneNumber
:
String
?)
{
override
fun
showAxbConfirmDialog
(
activity
:
Activity
?,
type
:
Int
,
phoneNumber
:
String
?)
{
val
dialog
=
AxbConfirmDialog
(
activity
,
type
,
object
:
AxbConfirmDialog
.
OnClickEnsureListener
{
ModularServiceManager
.
provide
(
IAudioImService
::
class
.
java
).
openAxbDialog
(
activity
,
type
,
phoneNumber
)
override
fun
onClickEnsure
()
{
phoneNumber
?.
let
{
val
phoneIntent
=
Intent
(
Intent
.
ACTION_DIAL
,
Uri
.
parse
(
"tel:"
+
phoneNumber
!!
))
activity
?.
startActivity
(
phoneIntent
)
}
}
override
fun
onClose
()
{
}
})
dialog
.
show
()
}
}
override
fun
closePlayer
()
{
override
fun
closePlayer
()
{
...
...
m-confide/src/main/java/com/ydl/confide/home/modular/service/ConfideWebServiceImpl.kt
View file @
220aae18
...
@@ -3,15 +3,12 @@ package com.ydl.confide.home.modular.service
...
@@ -3,15 +3,12 @@ package com.ydl.confide.home.modular.service
import
android.annotation.SuppressLint
import
android.annotation.SuppressLint
import
android.app.Activity
import
android.app.Activity
import
android.content.Context
import
android.content.Context
import
android.content.Intent
import
android.net.Uri
import
android.text.TextUtils
import
android.text.TextUtils
import
androidx.fragment.app.FragmentActivity
import
androidx.fragment.app.FragmentActivity
import
com.alibaba.android.arouter.launcher.ARouter
import
com.alibaba.android.arouter.launcher.ARouter
import
com.ydl.audioim.IntentConstants
import
com.ydl.audioim.api.IAudioImService
import
com.ydl.audioim.YDLavManager
import
com.ydl.audioim.bean.ExpertInfoBean
import
com.ydl.audioim.bean.ExpertInfoBean
import
com.ydl.audioim.
widget.AxbConfirmDialog
import
com.ydl.audioim.
listener.IntentConstants
import
com.ydl.confide.home.ConfidePermissionDialog
import
com.ydl.confide.home.ConfidePermissionDialog
import
com.ydl.confide.home.bean.ConfideConnectResponse
import
com.ydl.confide.home.bean.ConfideConnectResponse
import
com.ydl.confide.home.bean.ConnectParamJava
import
com.ydl.confide.home.bean.ConnectParamJava
...
@@ -21,6 +18,7 @@ import com.ydl.confide.router.PhoneCallIn
...
@@ -21,6 +18,7 @@ import com.ydl.confide.router.PhoneCallIn
import
com.ydl.webview.H5Params
import
com.ydl.webview.H5Params
import
com.ydl.webview.NewH5Activity
import
com.ydl.webview.NewH5Activity
import
com.ydl.webview.TellData
import
com.ydl.webview.TellData
import
com.ydl.ydlcommon.modular.ModularServiceManager
import
com.ydl.ydlcommon.modular.findRouteService
import
com.ydl.ydlcommon.modular.findRouteService
import
com.ydl.ydlcommon.ui.Loading
import
com.ydl.ydlcommon.ui.Loading
import
com.ydl.ydlcommon.utils.log.AliYunLogConfig
import
com.ydl.ydlcommon.utils.log.AliYunLogConfig
...
@@ -109,7 +107,7 @@ class ConfideWebServiceImpl {
...
@@ -109,7 +107,7 @@ class ConfideWebServiceImpl {
data
:
ConfideConnectResponse
?
data
:
ConfideConnectResponse
?
)
{
)
{
val
expertInfo
=
data
?.
dialDetail
?.
agoraExpertInfo
?:
return
val
expertInfo
=
data
?.
dialDetail
?.
agoraExpertInfo
?:
return
if
(!
YDLavManager
.
isOnlineRtm
)
{
// 判断如果账号在其它设备登录rtm是否在线
if
(!
ModularServiceManager
.
provide
(
IAudioImService
::
class
.
java
).
getIsOnlineRtm
()
)
{
// 判断如果账号在其它设备登录rtm是否在线
ToastUtil
.
toastShort
(
"网络通话错误代码001"
)
ToastUtil
.
toastShort
(
"网络通话错误代码001"
)
return
return
}
}
...
@@ -128,21 +126,9 @@ class ConfideWebServiceImpl {
...
@@ -128,21 +126,9 @@ class ConfideWebServiceImpl {
* axb 通话
* axb 通话
* */
* */
fun
axb
(
activity
:
Activity
,
phone
:
String
?)
{
fun
axb
(
activity
:
Activity
,
phone
:
String
?)
{
if
(
phone
.
isNullOrEmpty
())
return
if
(
phone
.
isNullOrEmpty
())
val
dialog
=
AxbConfirmDialog
(
return
activity
,
ModularServiceManager
.
provide
(
IAudioImService
::
class
.
java
).
openAxbDialog
(
activity
,
1
,
phone
)
1
,
object
:
AxbConfirmDialog
.
OnClickEnsureListener
{
override
fun
onClickEnsure
()
{
val
phoneIntent
=
Intent
(
Intent
.
ACTION_DIAL
,
Uri
.
parse
(
"tel:${phone}"
))
activity
.
startActivity
(
phoneIntent
)
}
override
fun
onClose
()
{
}
})
dialog
.
show
()
}
}
//java版axb和声网接口
//java版axb和声网接口
...
@@ -154,8 +140,8 @@ class ConfideWebServiceImpl {
...
@@ -154,8 +140,8 @@ class ConfideWebServiceImpl {
tellData
:
TellData
?,
tellData
:
TellData
?,
callType
:
String
?
callType
:
String
?
)
{
)
{
if
(!
YDLavManager
.
isOnlineRtm
)
{
if
(!
ModularServiceManager
.
provide
(
IAudioImService
::
class
.
java
).
getIsOnlineRtm
()
)
{
YDLavManager
.
instances
.
login
(
PhoneCallIn
.
getUserService
().
getUserInfo
()
?.
uid
)
{
isSuccess
:
Boolean
,
_
->
ModularServiceManager
.
provide
(
IAudioImService
::
class
.
java
).
loginRtm
(
PhoneCallIn
.
getUserService
().
getUserInfo
()
?.
uid
)
{
isSuccess
:
Boolean
,
_
->
if
(
isSuccess
)
{
if
(
isSuccess
)
{
toDial
(
id
,
type
,
callType
,
activity
,
tellData
)
toDial
(
id
,
type
,
callType
,
activity
,
tellData
)
}
else
{
}
else
{
...
@@ -340,7 +326,7 @@ class ConfideWebServiceImpl {
...
@@ -340,7 +326,7 @@ class ConfideWebServiceImpl {
expertInfo
.
remainingTime
=
expertInfo
.
remainingTime
=
ExpertInfoBean
.
ListenRemainingTime
(
expertInfo
.
totalDuration
);
ExpertInfoBean
.
ListenRemainingTime
(
expertInfo
.
totalDuration
);
}
}
YDLavManager
.
instances
.
callEventSave
(
"10"
,
"用户点击拨打"
,
expertInfo
.
channelId
,
"7"
)
ModularServiceManager
.
provide
(
IAudioImService
::
class
.
java
).
callEventSave
(
"10"
,
"用户点击拨打"
,
expertInfo
.
channelId
,
"7"
)
Loading
.
close
()
Loading
.
close
()
ARouter
.
getInstance
().
build
(
"/av/AudioHomeActivity"
)
ARouter
.
getInstance
().
build
(
"/av/AudioHomeActivity"
)
.
withString
(
IntentConstants
.
INTENT_EXPERT_HEAD_URL
,
expertInfo
.
expertHeadUrl
)
.
withString
(
IntentConstants
.
INTENT_EXPERT_HEAD_URL
,
expertInfo
.
expertHeadUrl
)
...
...
m-confide/src/main/java/com/ydl/confide/intro/ItemIntroHolder.kt
View file @
220aae18
...
@@ -16,7 +16,7 @@ import com.alibaba.android.arouter.launcher.ARouter
...
@@ -16,7 +16,7 @@ import com.alibaba.android.arouter.launcher.ARouter
import
com.dou361.ijkplayer.widget.IjkVideoView
import
com.dou361.ijkplayer.widget.IjkVideoView
import
com.facebook.drawee.backends.pipeline.Fresco
import
com.facebook.drawee.backends.pipeline.Fresco
import
com.facebook.drawee.interfaces.DraweeController
import
com.facebook.drawee.interfaces.DraweeController
import
com.ydl.audioim.
YDLavManager
import
com.ydl.audioim.
api.IAudioImService
import
com.ydl.confide.R
import
com.ydl.confide.R
import
com.ydl.confide.api.ConfideRoute
import
com.ydl.confide.api.ConfideRoute
import
com.ydl.confide.databinding.ItemExpertIntroBinding
import
com.ydl.confide.databinding.ItemExpertIntroBinding
...
@@ -27,6 +27,7 @@ import com.ydl.confide.router.PhoneCallIn
...
@@ -27,6 +27,7 @@ import com.ydl.confide.router.PhoneCallIn
import
com.ydl.webview.H5Params
import
com.ydl.webview.H5Params
import
com.ydl.webview.NewH5Activity
import
com.ydl.webview.NewH5Activity
import
com.ydl.ydlcommon.base.config.HttpConfig
import
com.ydl.ydlcommon.base.config.HttpConfig
import
com.ydl.ydlcommon.modular.ModularServiceManager
import
com.ydl.ydlcommon.modular.findRouteService
import
com.ydl.ydlcommon.modular.findRouteService
import
com.ydl.ydlcommon.utils.LogUtil
import
com.ydl.ydlcommon.utils.LogUtil
import
com.ydl.ydlcommon.utils.actionutil.ActionCountUtils
import
com.ydl.ydlcommon.utils.actionutil.ActionCountUtils
...
@@ -123,8 +124,8 @@ internal class ItemIntroHolder(binding: ItemExpertIntroBinding) :
...
@@ -123,8 +124,8 @@ internal class ItemIntroHolder(binding: ItemExpertIntroBinding) :
}
}
else
->
{
else
->
{
if
(!
item
.
confideId
.
isNullOrBlank
())
{
if
(!
item
.
confideId
.
isNullOrBlank
())
{
if
(!
YDLavManager
.
isOnlineRtm
)
{
if
(!
ModularServiceManager
.
provide
(
IAudioImService
::
class
.
java
).
getIsOnlineRtm
()
)
{
YDLavManager
.
instances
.
login
(
ModularServiceManager
.
provide
(
IAudioImService
::
class
.
java
).
loginRtm
(
PhoneCallIn
.
getUserService
().
getUserInfo
()
?.
uid
PhoneCallIn
.
getUserService
().
getUserInfo
()
?.
uid
)
{
_
:
Boolean
,
_
->
)
{
_
:
Boolean
,
_
->
showPayOrDetail
(
item
,
it
)
showPayOrDetail
(
item
,
it
)
...
...
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