Commit 4f1038e5 by 严久程

声网

parent 19a761e2
...@@ -42,7 +42,7 @@ ext { ...@@ -42,7 +42,7 @@ ext {
ydlPublishVersion = [ ydlPublishVersion = [
// -------------- 业务模块 -------------- // -------------- 业务模块 --------------
//第三步 若干 //第三步 若干
"m-confide" : "0.0.48.7", "m-confide" : "0.0.48.7.3",
"m-consultant" : "0.0.57.4", "m-consultant" : "0.0.57.4",
"m-fm" : "0.0.29.3", "m-fm" : "0.0.29.3",
"m-user" : "0.0.58.2", "m-user" : "0.0.58.2",
...@@ -75,7 +75,7 @@ ext { ...@@ -75,7 +75,7 @@ ext {
"ydl-webview" : "0.0.37.1", "ydl-webview" : "0.0.37.1",
"ydl-media" : "0.0.20", "ydl-media" : "0.0.20",
"ydl-pay" : "0.0.17", "ydl-pay" : "0.0.17",
"m-audioim" : "0.0.48.2", "m-audioim" : "0.0.48.2.3",
"ydl-flutter-base": "0.0.10.9", "ydl-flutter-base": "0.0.10.9",
//以下 几乎不会动 //以下 几乎不会动
...@@ -121,7 +121,7 @@ ext { ...@@ -121,7 +121,7 @@ ext {
"ydl-webview" : "0.0.37.1", "ydl-webview" : "0.0.37.1",
"ydl-media" : "0.0.20", "ydl-media" : "0.0.20",
"ydl-pay" : "0.0.17", "ydl-pay" : "0.0.17",
"m-audioim" : "0.0.48.2", "m-audioim" : "0.0.48.2.3",
"ydl-flutter-base": "0.0.10.9", "ydl-flutter-base": "0.0.10.9",
//以下 几乎不会动 //以下 几乎不会动
......
...@@ -75,7 +75,7 @@ dependencies { ...@@ -75,7 +75,7 @@ dependencies {
kapt "com.alibaba:arouter-compiler:$arouter_compiler" kapt "com.alibaba:arouter-compiler:$arouter_compiler"
api "com.alibaba:arouter-api:$arouter_api" api "com.alibaba:arouter-api:$arouter_api"
api ('com.ydl:ydl-av:1.2.0@aar'){ api ('com.ydl:ydl-av:1.2.1@aar'){
transitive = true transitive = true
} }
......
...@@ -248,7 +248,7 @@ class AudioHomeActivity : ...@@ -248,7 +248,7 @@ class AudioHomeActivity :
override fun onApiCallExecuted(error: Int, api: String?, result: String?) { override fun onApiCallExecuted(error: Int, api: String?, result: String?) {
super.onApiCallExecuted(error, api, result) super.onApiCallExecuted(error, api, result)
LogUtil.e("[agora]$api 已执行回调 $result") // LogUtil.e("[agora]$api 已执行回调 $result")
} }
...@@ -297,7 +297,7 @@ class AudioHomeActivity : ...@@ -297,7 +297,7 @@ class AudioHomeActivity :
override fun onLastmileQuality(quality: Int) { override fun onLastmileQuality(quality: Int) {
super.onLastmileQuality(quality) super.onLastmileQuality(quality)
LogUtil.e("[agora]网络质量报告回调${quality}") // LogUtil.e("[agora]网络质量报告回调${quality}")
} }
override fun onConnectionInterrupted() { override fun onConnectionInterrupted() {
...@@ -328,19 +328,6 @@ class AudioHomeActivity : ...@@ -328,19 +328,6 @@ class AudioHomeActivity :
} }
// //
/**
* 上传错误日志
* zhu 洪平要的,判别是移动端主动调的还是声网返的
*/
private fun uploadException(message: String, zhu: String = "") {
var time: String = (System.currentTimeMillis() / 1000).toString()
var uid: String =
ModularServiceManager.provide(IUserService::class.java).getUserInfo()?.uid!!
var payLoad = PayLoad(channelId ?: "0", time, uid, "1", "999", message)
var connectException = ConnectExceptionCommand(time + zhu, "2", "99", payLoad)
getPresenter().connectException(connectException)
}
override fun createPresenter(): IAudioHomeActivityContract.Presenter { override fun createPresenter(): IAudioHomeActivityContract.Presenter {
return AudioHomePresenterImpl() return AudioHomePresenterImpl()
} }
...@@ -493,6 +480,7 @@ class AudioHomeActivity : ...@@ -493,6 +480,7 @@ class AudioHomeActivity :
//RTC 回调 //RTC 回调
YDLRTMClient.instances.setCallListener(object : CallListener { YDLRTMClient.instances.setCallListener(object : CallListener {
override fun onCallRecivedByPeer(response: CallLocalResponse?) { override fun onCallRecivedByPeer(response: CallLocalResponse?) {
playWaitingMusic()
//返回给主叫:被叫已收到呼叫邀请 //返回给主叫:被叫已收到呼叫邀请
LogUtil.i("[agora]${response?.calleeId}已收到呼叫邀请,频道号${response?.ChannelId}") LogUtil.i("[agora]${response?.calleeId}已收到呼叫邀请,频道号${response?.ChannelId}")
} }
...@@ -638,7 +626,13 @@ class AudioHomeActivity : ...@@ -638,7 +626,13 @@ class AudioHomeActivity :
.take(603) .take(603)
.observeOn(AndroidSchedulers.mainThread()) .observeOn(AndroidSchedulers.mainThread())
.subscribe({ .subscribe({
progress_view.setProgress(it.toFloat() / 2.5f) var result = it.toFloat() / 2.5f
progress_view.setProgress(result)
if (result >= 100f && !iv_hang_up.isEnabled) {
//挂断按钮可点击
iv_hang_up.isEnabled = true
iv_hang_up.setImageResource(R.drawable.audioim_img_hang_up)
}
}, { }, {
LogUtil.d(it.message) LogUtil.d(it.message)
}, { }, {
...@@ -797,7 +791,7 @@ class AudioHomeActivity : ...@@ -797,7 +791,7 @@ class AudioHomeActivity :
/** /**
* 30s等待完成,专家未接听 * 60s等待完成,专家未接听
*/ */
private fun waittingStatus() { private fun waittingStatus() {
//挂断按钮可点击 //挂断按钮可点击
...@@ -1120,6 +1114,21 @@ class AudioHomeActivity : ...@@ -1120,6 +1114,21 @@ class AudioHomeActivity :
} }
} }
/**
* 上传错误日志
* zhu 洪平要的,判别是移动端主动调的还是声网返的
*/
private fun uploadException(message: String, zhu: String = "") {
var time: String = (System.currentTimeMillis() / 1000).toString()
var uid: String =
ModularServiceManager.provide(IUserService::class.java).getUserInfo()?.uid!!
var payLoad = PayLoad(channelId ?: "0", time, uid, "1", "999", message)
var connectException = ConnectExceptionCommand(time + zhu, "2", "99", payLoad)
getPresenter().connectException(connectException)
}
override fun finishActivity() { override fun finishActivity() {
leaveChannel() leaveChannel()
} }
......
package com.ydl.audioim.presenter package com.ydl.audioim.presenter
import android.annotation.SuppressLint
import com.ydl.audioim.BuildConfig import com.ydl.audioim.BuildConfig
import com.ydl.ydl_av.chat.config.YDLChatParam import com.ydl.ydl_av.chat.config.YDLChatParam
import com.ydl.audioim.contract.IAudioHomeActivityContract import com.ydl.audioim.contract.IAudioHomeActivityContract
...@@ -106,6 +107,7 @@ class AudioHomePresenterImpl : BasePresenter<IAudioHomeActivityContract.View, IA ...@@ -106,6 +107,7 @@ class AudioHomePresenterImpl : BasePresenter<IAudioHomeActivityContract.View, IA
/** /**
* 获取axb电话 * 获取axb电话
*/ */
@SuppressLint("CheckResult")
override fun getAXBPhone(cmd: ConnectCommand) { override fun getAXBPhone(cmd: ConnectCommand) {
mModel.getAXBPhone(cmd) mModel.getAXBPhone(cmd)
.subscribeOn(Schedulers.io()) .subscribeOn(Schedulers.io())
...@@ -113,7 +115,7 @@ class AudioHomePresenterImpl : BasePresenter<IAudioHomeActivityContract.View, IA ...@@ -113,7 +115,7 @@ class AudioHomePresenterImpl : BasePresenter<IAudioHomeActivityContract.View, IA
.doOnSubscribe { mView.showProgressView() } .doOnSubscribe { mView.showProgressView() }
.doAfterTerminate { mView.dismissProgressView() } .doAfterTerminate { mView.dismissProgressView() }
.subscribe({ .subscribe({
if ("200".equals(it.code)){ if ("200" == it.code){
if(0==it.data?.dialDetail?.dialStatus?:-1){ if(0==it.data?.dialDetail?.dialStatus?:-1){
//连接成功 //连接成功
if(it.data?.dialDetail?.callConnectType?:-1==1){ if(it.data?.dialDetail?.callConnectType?:-1==1){
......
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