Commit 4e64c6bd by 徐健

删除声网开启关闭的接口

parent 9a0aa349
......@@ -609,13 +609,13 @@ class AudioHomeActivity : BaseMvpActivity<IAudioHomeActivityContract.View, IAudi
remainTime!!.toInt() - localRemainTime!!, callId!!,
"0","0","$callStartTime",
"${System.currentTimeMillis()}",3)
mPresenter.connectFinish(param)
// mPresenter.connectFinish(param)
}else{
//接通开始回调
callStartTime = System.currentTimeMillis()
var param = ConnectStartCommand(listenerUid!!, relationId!!, callId!!,
"${System.currentTimeMillis()}","3","0","0","0","0")
mPresenter.connectStart(param)
// mPresenter.connectStart(param)
}
}
......
......@@ -66,13 +66,13 @@ interface IAudioHomeActivityContract {
* 通话开始(更新专家状态)
* @param param 请求参数
*/
fun connectStart(param: ConnectStartCommand)
// fun connectStart(param: ConnectStartCommand)
/**
* 通话结束(更新专家状态)
* @param param 请求参数
*/
fun connectFinish(param: ConnectFinishCommand)
// fun connectFinish(param: ConnectFinishCommand)
/**
......@@ -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>>
/**
......
......@@ -41,12 +41,12 @@ class AudioApiRequestUtil {
* @param param
* @return
*/
fun connectStart(param: ConnectStartCommand): Observable<BaseAPIResponse<Any>> {
// val list = YdlRetrofitUtils.getPostList(param)
var str = Gson().toJson(param)
val body = RequestBody.create(MediaType.parse("application/json; charset=utf-8"), str) as RequestBody
return YDLHttpUtils.obtainApi(AudioNetAPi::class.java).connectStart(body)
}
// fun connectStart(param: ConnectStartCommand): Observable<BaseAPIResponse<Any>> {
//// val list = YdlRetrofitUtils.getPostList(param)
// var str = Gson().toJson(param)
// val body = RequestBody.create(MediaType.parse("application/json; charset=utf-8"), str) as RequestBody
// return YDLHttpUtils.obtainApi(AudioNetAPi::class.java).connectStart(body)
// }
/**
* 通话结束回调
......@@ -54,12 +54,12 @@ class AudioApiRequestUtil {
* @param param
* @return
*/
fun connectFinish(param: ConnectFinishCommand): Observable<BaseAPIResponse<Any>> {
// val list = YdlRetrofitUtils.getPostList(param)
var str = Gson().toJson(param)
val body = RequestBody.create(MediaType.parse("application/json; charset=utf-8"), str) as RequestBody
return YDLHttpUtils.obtainApi(AudioNetAPi::class.java).connectFinish(body)
}
// fun connectFinish(param: ConnectFinishCommand): Observable<BaseAPIResponse<Any>> {
//// val list = YdlRetrofitUtils.getPostList(param)
// var str = Gson().toJson(param)
// val body = RequestBody.create(MediaType.parse("application/json; charset=utf-8"), str) as RequestBody
// return YDLHttpUtils.obtainApi(AudioNetAPi::class.java).connectFinish(body)
// }
/**
* 通知服务端发送推送
......
......@@ -21,16 +21,16 @@ interface AudioNetAPi {
/**
* 通话开始回调
*/
@Headers( YDL_DOMAIN+ YDL_DOMAIN_JAVA,"Content-Type:application/json")
@POST("auth/listen-order/callback/agora/start")
fun connectStart(@Body body:RequestBody): Observable<BaseAPIResponse<Any>>
// @Headers( YDL_DOMAIN+ YDL_DOMAIN_JAVA,"Content-Type:application/json")
// @POST("auth/listen-order/callback/agora/start")
// fun connectStart(@Body body:RequestBody): Observable<BaseAPIResponse<Any>>
/**
* 通话结束回调
*/
@Headers( YDL_DOMAIN + YDL_DOMAIN_JAVA,"Content-Type:application/json")
@POST("auth/listen-order/callback/agora/finish")
fun connectFinish(@Body body:RequestBody): Observable<BaseAPIResponse<Any>>
// @Headers( YDL_DOMAIN + YDL_DOMAIN_JAVA,"Content-Type:application/json")
// @POST("auth/listen-order/callback/agora/finish")
// fun connectFinish(@Body body:RequestBody): Observable<BaseAPIResponse<Any>>
/**
......
......@@ -19,13 +19,13 @@ import io.reactivex.Observable
* @date 2018/10/30
*/
class AudioHomeModelImpl : IAudioHomeActivityContract.Model {
override fun connectStart(param: ConnectStartCommand): Observable<BaseAPIResponse<Any>> {
return AudioApiRequestUtil.connectStart(param)
}
override fun connectFinish(param: ConnectFinishCommand): Observable<BaseAPIResponse<Any>> {
return AudioApiRequestUtil.connectFinish(param)
}
// override fun connectStart(param: ConnectStartCommand): Observable<BaseAPIResponse<Any>> {
// return AudioApiRequestUtil.connectStart(param)
// }
//
// override fun connectFinish(param: ConnectFinishCommand): Observable<BaseAPIResponse<Any>> {
// return AudioApiRequestUtil.connectFinish(param)
// }
override fun noticeServerPush(param: NoticePushCommand): Observable<BaseResponse<Any>> {
return AudioApiRequestUtil.noticeServerPush(param)
......
......@@ -23,50 +23,50 @@ import io.reactivex.schedulers.Schedulers
* @date 2018/10/30
*/
class AudioHomePresenterImpl : BasePresenter<IAudioHomeActivityContract.View, IAudioHomeActivityContract.Model>(), IAudioHomeActivityContract.Presenter {
override fun connectStart(param: ConnectStartCommand) {
mModel.connectStart(param)
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.doOnSubscribe {
}
.doAfterTerminate {
// view.dismissProgressView()
}
.subscribe({
// if (isSwitchAxb) {
// //切换axb:跳到拨号界面
// view.dialPhone()
// override fun connectStart(param: ConnectStartCommand) {
// mModel.connectStart(param)
// .subscribeOn(Schedulers.io())
// .observeOn(AndroidSchedulers.mainThread())
// .doOnSubscribe {
//
// }
// .doAfterTerminate {
//// view.dismissProgressView()
// }
// .subscribe({
//// if (isSwitchAxb) {
//// //切换axb:跳到拨号界面
//// view.dialPhone()
//// }
// }, { e ->
// LogUtil.e(e.message)
// })
// }
}, { e ->
LogUtil.e(e.message)
})
}
override fun connectFinish(param: ConnectFinishCommand) {
mModel.connectFinish(param)
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.doOnSubscribe {
//通知服务端专家已经接通时,此时用户已在界面通话中,不需要弹进度条
mView.showProgressView()
}
.doAfterTerminate {
mView.dismissProgressView()
}
.subscribe({
// if (isSwitchAxb) {
// //切换axb:跳到拨号界面
// view.dialPhone()
// override fun connectFinish(param: ConnectFinishCommand) {
// mModel.connectFinish(param)
// .subscribeOn(Schedulers.io())
// .observeOn(AndroidSchedulers.mainThread())
// .doOnSubscribe {
// //通知服务端专家已经接通时,此时用户已在界面通话中,不需要弹进度条
// mView.showProgressView()
// }
// .doAfterTerminate {
// mView.dismissProgressView()
// }
// .subscribe({
//// if (isSwitchAxb) {
//// //切换axb:跳到拨号界面
//// view.dialPhone()
//// }
// //挂断逻辑:不管接口调用成功与否,都关闭界面
// mView.finishActivity()
// }, { e ->
// LogUtil.e(e.message)
// //挂断逻辑:不管接口调用成功与否,都关闭界面
// mView.finishActivity()
// })
// }
//挂断逻辑:不管接口调用成功与否,都关闭界面
mView.finishActivity()
}, { e ->
LogUtil.e(e.message)
//挂断逻辑:不管接口调用成功与否,都关闭界面
mView.finishActivity()
})
}
/**
* 登录声网
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment