Commit 4e64c6bd by 徐健

删除声网开启关闭的接口

parent 9a0aa349
...@@ -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)
} }
} }
......
...@@ -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>>
/** /**
......
...@@ -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)
} // }
/** /**
* 通知服务端发送推送 * 通知服务端发送推送
......
...@@ -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>>
/** /**
......
...@@ -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)
......
...@@ -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()
})
}
/** /**
* 登录声网 * 登录声网
......
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