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
4e64c6bd
Commit
4e64c6bd
authored
Nov 27, 2019
by
徐健
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
删除声网开启关闭的接口
parent
9a0aa349
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
72 additions
and
72 deletions
+72
-72
AudioHomeActivity.kt
m-audioim/src/main/java/com/ydl/audioim/AudioHomeActivity.kt
+2
-2
IAudioHomeActivityContract.kt
m-audioim/src/main/java/com/ydl/audioim/contract/IAudioHomeActivityContract.kt
+4
-4
AudioApiRequestUtil.kt
m-audioim/src/main/java/com/ydl/audioim/http/AudioApiRequestUtil.kt
+12
-12
AudioNetAPi.kt
m-audioim/src/main/java/com/ydl/audioim/http/AudioNetAPi.kt
+6
-6
AudioHomeModelImpl.kt
m-audioim/src/main/java/com/ydl/audioim/model/AudioHomeModelImpl.kt
+7
-7
AudioHomePresenterImpl.kt
m-audioim/src/main/java/com/ydl/audioim/presenter/AudioHomePresenterImpl.kt
+41
-41
No files found.
m-audioim/src/main/java/com/ydl/audioim/AudioHomeActivity.kt
View file @
4e64c6bd
...
@@ -609,13 +609,13 @@ class AudioHomeActivity : BaseMvpActivity<IAudioHomeActivityContract.View, IAudi
...
@@ -609,13 +609,13 @@ class AudioHomeActivity : BaseMvpActivity<IAudioHomeActivityContract.View, IAudi
remainTime
!!
.
toInt
()
-
localRemainTime
!!
,
callId
!!
,
remainTime
!!
.
toInt
()
-
localRemainTime
!!
,
callId
!!
,
"0"
,
"0"
,
"$callStartTime"
,
"0"
,
"0"
,
"$callStartTime"
,
"${System.currentTimeMillis()}"
,
3
)
"${System.currentTimeMillis()}"
,
3
)
mPresenter
.
connectFinish
(
param
)
//
mPresenter.connectFinish(param)
}
else
{
}
else
{
//接通开始回调
//接通开始回调
callStartTime
=
System
.
currentTimeMillis
()
callStartTime
=
System
.
currentTimeMillis
()
var
param
=
ConnectStartCommand
(
listenerUid
!!
,
relationId
!!
,
callId
!!
,
var
param
=
ConnectStartCommand
(
listenerUid
!!
,
relationId
!!
,
callId
!!
,
"${System.currentTimeMillis()}"
,
"3"
,
"0"
,
"0"
,
"0"
,
"0"
)
"${System.currentTimeMillis()}"
,
"3"
,
"0"
,
"0"
,
"0"
,
"0"
)
mPresenter
.
connectStart
(
param
)
//
mPresenter.connectStart(param)
}
}
}
}
...
...
m-audioim/src/main/java/com/ydl/audioim/contract/IAudioHomeActivityContract.kt
View file @
4e64c6bd
...
@@ -66,13 +66,13 @@ interface IAudioHomeActivityContract {
...
@@ -66,13 +66,13 @@ interface IAudioHomeActivityContract {
* 通话开始(更新专家状态)
* 通话开始(更新专家状态)
* @param param 请求参数
* @param param 请求参数
*/
*/
fun
connectStart
(
param
:
ConnectStartCommand
)
//
fun connectStart(param: ConnectStartCommand)
/**
/**
* 通话结束(更新专家状态)
* 通话结束(更新专家状态)
* @param param 请求参数
* @param param 请求参数
*/
*/
fun
connectFinish
(
param
:
ConnectFinishCommand
)
//
fun connectFinish(param: ConnectFinishCommand)
/**
/**
...
@@ -91,12 +91,12 @@ interface IAudioHomeActivityContract {
...
@@ -91,12 +91,12 @@ interface IAudioHomeActivityContract {
/**
/**
* 通话开始回调(更新专家状态)
* 通话开始回调(更新专家状态)
*/
*/
fun
connectStart
(
param
:
ConnectStartCommand
):
Observable
<
BaseAPIResponse
<
Any
>>
//
fun connectStart(param: ConnectStartCommand): Observable<BaseAPIResponse<Any>>
/**
/**
* 通话结束(更新专家状态)
* 通话结束(更新专家状态)
*/
*/
fun
connectFinish
(
param
:
ConnectFinishCommand
):
Observable
<
BaseAPIResponse
<
Any
>>
//
fun connectFinish(param: ConnectFinishCommand): Observable<BaseAPIResponse<Any>>
/**
/**
...
...
m-audioim/src/main/java/com/ydl/audioim/http/AudioApiRequestUtil.kt
View file @
4e64c6bd
...
@@ -41,12 +41,12 @@ class AudioApiRequestUtil {
...
@@ -41,12 +41,12 @@ class AudioApiRequestUtil {
* @param param
* @param param
* @return
* @return
*/
*/
fun
connectStart
(
param
:
ConnectStartCommand
):
Observable
<
BaseAPIResponse
<
Any
>>
{
//
fun connectStart(param: ConnectStartCommand): Observable<BaseAPIResponse<Any>> {
// val list = YdlRetrofitUtils.getPostList(param)
//
//
val list = YdlRetrofitUtils.getPostList(param)
var
str
=
Gson
().
toJson
(
param
)
//
var str = Gson().toJson(param)
val
body
=
RequestBody
.
create
(
MediaType
.
parse
(
"application/json; charset=utf-8"
),
str
)
as
RequestBody
//
val body = RequestBody.create(MediaType.parse("application/json; charset=utf-8"), str) as RequestBody
return
YDLHttpUtils
.
obtainApi
(
AudioNetAPi
::
class
.
java
).
connectStart
(
body
)
//
return YDLHttpUtils.obtainApi(AudioNetAPi::class.java).connectStart(body)
}
//
}
/**
/**
* 通话结束回调
* 通话结束回调
...
@@ -54,12 +54,12 @@ class AudioApiRequestUtil {
...
@@ -54,12 +54,12 @@ class AudioApiRequestUtil {
* @param param
* @param param
* @return
* @return
*/
*/
fun
connectFinish
(
param
:
ConnectFinishCommand
):
Observable
<
BaseAPIResponse
<
Any
>>
{
//
fun connectFinish(param: ConnectFinishCommand): Observable<BaseAPIResponse<Any>> {
// val list = YdlRetrofitUtils.getPostList(param)
//
//
val list = YdlRetrofitUtils.getPostList(param)
var
str
=
Gson
().
toJson
(
param
)
//
var str = Gson().toJson(param)
val
body
=
RequestBody
.
create
(
MediaType
.
parse
(
"application/json; charset=utf-8"
),
str
)
as
RequestBody
//
val body = RequestBody.create(MediaType.parse("application/json; charset=utf-8"), str) as RequestBody
return
YDLHttpUtils
.
obtainApi
(
AudioNetAPi
::
class
.
java
).
connectFinish
(
body
)
//
return YDLHttpUtils.obtainApi(AudioNetAPi::class.java).connectFinish(body)
}
//
}
/**
/**
* 通知服务端发送推送
* 通知服务端发送推送
...
...
m-audioim/src/main/java/com/ydl/audioim/http/AudioNetAPi.kt
View file @
4e64c6bd
...
@@ -21,16 +21,16 @@ interface AudioNetAPi {
...
@@ -21,16 +21,16 @@ interface AudioNetAPi {
/**
/**
* 通话开始回调
* 通话开始回调
*/
*/
@Headers
(
YDL_DOMAIN
+
YDL_DOMAIN_JAVA
,
"Content-Type:application/json"
)
//
@Headers( YDL_DOMAIN+ YDL_DOMAIN_JAVA,"Content-Type:application/json")
@POST
(
"auth/listen-order/callback/agora/start"
)
//
@POST("auth/listen-order/callback/agora/start")
fun
connectStart
(
@Body
body
:
RequestBody
):
Observable
<
BaseAPIResponse
<
Any
>>
//
fun connectStart(@Body body:RequestBody): Observable<BaseAPIResponse<Any>>
/**
/**
* 通话结束回调
* 通话结束回调
*/
*/
@Headers
(
YDL_DOMAIN
+
YDL_DOMAIN_JAVA
,
"Content-Type:application/json"
)
//
@Headers( YDL_DOMAIN + YDL_DOMAIN_JAVA,"Content-Type:application/json")
@POST
(
"auth/listen-order/callback/agora/finish"
)
//
@POST("auth/listen-order/callback/agora/finish")
fun
connectFinish
(
@Body
body
:
RequestBody
):
Observable
<
BaseAPIResponse
<
Any
>>
//
fun connectFinish(@Body body:RequestBody): Observable<BaseAPIResponse<Any>>
/**
/**
...
...
m-audioim/src/main/java/com/ydl/audioim/model/AudioHomeModelImpl.kt
View file @
4e64c6bd
...
@@ -19,13 +19,13 @@ import io.reactivex.Observable
...
@@ -19,13 +19,13 @@ import io.reactivex.Observable
* @date 2018/10/30
* @date 2018/10/30
*/
*/
class
AudioHomeModelImpl
:
IAudioHomeActivityContract
.
Model
{
class
AudioHomeModelImpl
:
IAudioHomeActivityContract
.
Model
{
override
fun
connectStart
(
param
:
ConnectStartCommand
):
Observable
<
BaseAPIResponse
<
Any
>>
{
//
override fun connectStart(param: ConnectStartCommand): Observable<BaseAPIResponse<Any>> {
return
AudioApiRequestUtil
.
connectStart
(
param
)
//
return AudioApiRequestUtil.connectStart(param)
}
//
}
//
override
fun
connectFinish
(
param
:
ConnectFinishCommand
):
Observable
<
BaseAPIResponse
<
Any
>>
{
//
override fun connectFinish(param: ConnectFinishCommand): Observable<BaseAPIResponse<Any>> {
return
AudioApiRequestUtil
.
connectFinish
(
param
)
//
return AudioApiRequestUtil.connectFinish(param)
}
//
}
override
fun
noticeServerPush
(
param
:
NoticePushCommand
):
Observable
<
BaseResponse
<
Any
>>
{
override
fun
noticeServerPush
(
param
:
NoticePushCommand
):
Observable
<
BaseResponse
<
Any
>>
{
return
AudioApiRequestUtil
.
noticeServerPush
(
param
)
return
AudioApiRequestUtil
.
noticeServerPush
(
param
)
...
...
m-audioim/src/main/java/com/ydl/audioim/presenter/AudioHomePresenterImpl.kt
View file @
4e64c6bd
...
@@ -23,50 +23,50 @@ import io.reactivex.schedulers.Schedulers
...
@@ -23,50 +23,50 @@ import io.reactivex.schedulers.Schedulers
* @date 2018/10/30
* @date 2018/10/30
*/
*/
class
AudioHomePresenterImpl
:
BasePresenter
<
IAudioHomeActivityContract
.
View
,
IAudioHomeActivityContract
.
Model
>(),
IAudioHomeActivityContract
.
Presenter
{
class
AudioHomePresenterImpl
:
BasePresenter
<
IAudioHomeActivityContract
.
View
,
IAudioHomeActivityContract
.
Model
>(),
IAudioHomeActivityContract
.
Presenter
{
override
fun
connectStart
(
param
:
ConnectStartCommand
)
{
// override fun connectStart(param: ConnectStartCommand) {
mModel
.
connectStart
(
param
)
// mModel.connectStart(param)
.
subscribeOn
(
Schedulers
.
io
())
// .subscribeOn(Schedulers.io())
.
observeOn
(
AndroidSchedulers
.
mainThread
())
// .observeOn(AndroidSchedulers.mainThread())
.
doOnSubscribe
{
// .doOnSubscribe {
//
}
// }
.
doAfterTerminate
{
// .doAfterTerminate {
// view.dismissProgressView()
//// view.dismissProgressView()
}
// }
.
subscribe
({
// .subscribe({
// if (isSwitchAxb) {
//// if (isSwitchAxb) {
// //切换axb:跳到拨号界面
//// //切换axb:跳到拨号界面
// view.dialPhone()
//// view.dialPhone()
//// }
// }, { e ->
// LogUtil.e(e.message)
// })
// }
// }
},
{
e
->
LogUtil
.
e
(
e
.
message
)
})
}
override
fun
connectFinish
(
param
:
ConnectFinishCommand
)
{
// override fun connectFinish(param: ConnectFinishCommand) {
mModel
.
connectFinish
(
param
)
// mModel.connectFinish(param)
.
subscribeOn
(
Schedulers
.
io
())
// .subscribeOn(Schedulers.io())
.
observeOn
(
AndroidSchedulers
.
mainThread
())
// .observeOn(AndroidSchedulers.mainThread())
.
doOnSubscribe
{
// .doOnSubscribe {
//通知服务端专家已经接通时,此时用户已在界面通话中,不需要弹进度条
// //通知服务端专家已经接通时,此时用户已在界面通话中,不需要弹进度条
mView
.
showProgressView
()
// mView.showProgressView()
}
// }
.
doAfterTerminate
{
// .doAfterTerminate {
mView
.
dismissProgressView
()
// mView.dismissProgressView()
}
// }
.
subscribe
({
// .subscribe({
// if (isSwitchAxb) {
//// if (isSwitchAxb) {
// //切换axb:跳到拨号界面
//// //切换axb:跳到拨号界面
// view.dialPhone()
//// view.dialPhone()
//// }
// //挂断逻辑:不管接口调用成功与否,都关闭界面
// mView.finishActivity()
// }, { e ->
// LogUtil.e(e.message)
// //挂断逻辑:不管接口调用成功与否,都关闭界面
// mView.finishActivity()
// })
// }
// }
//挂断逻辑:不管接口调用成功与否,都关闭界面
mView
.
finishActivity
()
},
{
e
->
LogUtil
.
e
(
e
.
message
)
//挂断逻辑:不管接口调用成功与否,都关闭界面
mView
.
finishActivity
()
})
}
/**
/**
* 登录声网
* 登录声网
...
...
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