Commit 55311e1f by 严久程

1、声网挂断逻辑增加二次确认

2、私聊页面ui样调整
parent 452fbcad
...@@ -42,12 +42,12 @@ ext { ...@@ -42,12 +42,12 @@ ext {
ydlPublishVersion = [ ydlPublishVersion = [
// -------------- 业务模块 -------------- // -------------- 业务模块 --------------
//第三步 若干 //第三步 若干
"m-confide" : "0.0.48.7.12", "m-confide" : "0.0.48.7.16",
"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.60.1", "m-user" : "0.0.60.1",
"m-home" : "0.0.19.1", "m-home" : "0.0.19.1",
"m-im" : "0.0.17.0", "m-im" : "0.0.17.4",
"m-dynamic" : "0.0.7.5", "m-dynamic" : "0.0.7.5",
"m-muse" : "0.0.28.9", "m-muse" : "0.0.28.9",
...@@ -75,7 +75,7 @@ ext { ...@@ -75,7 +75,7 @@ ext {
"ydl-webview" : "0.0.38.26", "ydl-webview" : "0.0.38.26",
"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.3.2", "m-audioim" : "0.0.48.3.5",
"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.38.24", "ydl-webview" : "0.0.38.24",
"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.3.2", "m-audioim" : "0.0.48.3.5",
"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.1@aar'){ api ('com.ydl:ydl-av:1.2.3@aar'){
transitive = true transitive = true
} }
......
...@@ -42,6 +42,7 @@ import com.ydl.webview.RefreshWebEvent ...@@ -42,6 +42,7 @@ import com.ydl.webview.RefreshWebEvent
import com.ydl.ydl_av.chat.bean.AudioMessageBean import com.ydl.ydl_av.chat.bean.AudioMessageBean
import com.ydl.ydl_av.messge_service.YDLRTMClient import com.ydl.ydl_av.messge_service.YDLRTMClient
import com.ydl.ydl_av.messge_service.callback.CallListener import com.ydl.ydl_av.messge_service.callback.CallListener
import com.ydl.ydl_av.messge_service.callback.CancelCallStatusListener
import com.ydl.ydl_av.messge_service.response.CallLocalResponse import com.ydl.ydl_av.messge_service.response.CallLocalResponse
import com.ydl.ydl_av.messge_service.response.CallRemoteResponse import com.ydl.ydl_av.messge_service.response.CallRemoteResponse
import com.ydl.ydl_av.voice.listener.IYDLVoiceEventHandler import com.ydl.ydl_av.voice.listener.IYDLVoiceEventHandler
...@@ -273,7 +274,7 @@ class AudioHomeActivity : ...@@ -273,7 +274,7 @@ class AudioHomeActivity :
LogUtil.e("[agora]$uid 用户声网重新加入频道成功:channel=$channel") LogUtil.e("[agora]$uid 用户声网重新加入频道成功:channel=$channel")
runOnUiThread { runOnUiThread {
//自己加入频道成功 //自己加入频道成功
if(!isConnectSuccess){ if (!isConnectSuccess) {
connectSuccess() connectSuccess()
} }
} }
...@@ -472,7 +473,11 @@ class AudioHomeActivity : ...@@ -472,7 +473,11 @@ class AudioHomeActivity :
userCloseCalling() userCloseCalling()
} }
ActionCountUtils.count("shengwang_popup_layer_page|shengwang_popup_layer_refuse_click", YdlCommonRouterManager.getYdlCommonRoute().getUid().toString(), uid = YdlCommonRouterManager.getYdlCommonRoute().getUid().toString()) ActionCountUtils.count(
"shengwang_popup_layer_page|shengwang_popup_layer_refuse_click",
YdlCommonRouterManager.getYdlCommonRoute().getUid().toString(),
uid = YdlCommonRouterManager.getYdlCommonRoute().getUid().toString()
)
} }
//免提 //免提
...@@ -680,7 +685,21 @@ class AudioHomeActivity : ...@@ -680,7 +685,21 @@ class AudioHomeActivity :
stopPlaying() stopPlaying()
//提示切换传统线路 //提示切换传统线路
//发送消息通知专家用户已挂断 //发送消息通知专家用户已挂断
YDLRTMClient.instances.cancelCall(listenerUid, channelId) YDLRTMClient.instances.cancelCall(
listenerUid,
channelId,
object : CancelCallStatusListener {
override fun onFailure(errorMsg: String?, errorCode: Int) {
//二次措施:取消呼叫的通知失败后再发送一次
YDLRTMClient.instances.cancelCall(
listenerUid,
channelId, null
)
}
override fun onSuccess() {
}
})
//通话结束或挂断时,上传日志文件 //通话结束或挂断时,上传日志文件
uploadLog() uploadLog()
...@@ -724,7 +743,21 @@ class AudioHomeActivity : ...@@ -724,7 +743,21 @@ class AudioHomeActivity :
*/ */
private fun userCloseCalling() { private fun userCloseCalling() {
//发送消息通知专家用户已挂断 //发送消息通知专家用户已挂断
YDLRTMClient.instances.cancelCall(listenerUid, channelId) YDLRTMClient.instances.cancelCall(
listenerUid,
channelId,
object : CancelCallStatusListener {
override fun onFailure(errorMsg: String?, errorCode: Int) {
//二次措施:取消呼叫的通知失败后再发送一次
YDLRTMClient.instances.cancelCall(
listenerUid,
channelId, null
)
}
override fun onSuccess() {
}
})
//通话结束或挂断时,上传日志文件 //通话结束或挂断时,上传日志文件
uploadLog() uploadLog()
handler!!.postDelayed({ handler!!.postDelayed({
...@@ -809,7 +842,22 @@ class AudioHomeActivity : ...@@ -809,7 +842,22 @@ class AudioHomeActivity :
} else { } else {
//未连接成功,切换axb时:需发送消息通知专家端用户已挂断 //未连接成功,切换axb时:需发送消息通知专家端用户已挂断
//发送消息通知专家用户已挂断 //发送消息通知专家用户已挂断
YDLRTMClient.instances.cancelCall(listenerUid, channelId) YDLRTMClient.instances.cancelCall(
listenerUid,
channelId,
object : CancelCallStatusListener {
override fun onFailure(errorMsg: String?, errorCode: Int) {
//二次措施:取消呼叫的通知失败后再发送一次
YDLRTMClient.instances.cancelCall(
listenerUid,
channelId, null
)
}
override fun onSuccess() {
}
})
leaveChannel() leaveChannel()
} }
} }
...@@ -1089,7 +1137,11 @@ class AudioHomeActivity : ...@@ -1089,7 +1137,11 @@ class AudioHomeActivity :
) )
ActionCountUtils.count("shengwang_popup_layer_page|shengwang_popup_layer_page_visit", "", uid = YdlCommonRouterManager.getYdlCommonRoute().getUid().toString()) ActionCountUtils.count(
"shengwang_popup_layer_page|shengwang_popup_layer_page_visit",
"",
uid = YdlCommonRouterManager.getYdlCommonRoute().getUid().toString()
)
} }
override fun onAccuracyChanged(sensor: Sensor?, accuracy: Int) { override fun onAccuracyChanged(sensor: Sensor?, accuracy: Int) {
......
...@@ -36,7 +36,6 @@ public class ConfideOrderInfoView extends RelativeLayout { ...@@ -36,7 +36,6 @@ public class ConfideOrderInfoView extends RelativeLayout {
private String mSessionId; private String mSessionId;
private IP2PCustomActionHandler.DocInfo info = null; private IP2PCustomActionHandler.DocInfo info = null;
private TextView tv_status = null; private TextView tv_status = null;
private TextView tv_tips = null;
private TextView tv_action = null; private TextView tv_action = null;
private TextView tv_order_info = null; private TextView tv_order_info = null;
private ImageView iv_call = null; private ImageView iv_call = null;
...@@ -61,7 +60,6 @@ public class ConfideOrderInfoView extends RelativeLayout { ...@@ -61,7 +60,6 @@ public class ConfideOrderInfoView extends RelativeLayout {
View.inflate(mContext, R.layout.im_nim_chat_confide_order_info_view, this); View.inflate(mContext, R.layout.im_nim_chat_confide_order_info_view, this);
setBackground(getResources().getDrawable(R.drawable.im_bg_im_confide_action)); setBackground(getResources().getDrawable(R.drawable.im_bg_im_confide_action));
tv_status = findViewById(R.id.tv_status); tv_status = findViewById(R.id.tv_status);
tv_tips = findViewById(R.id.tv_tips);
tv_action = findViewById(R.id.tv_action); tv_action = findViewById(R.id.tv_action);
iv_call = findViewById(R.id.iv_call); iv_call = findViewById(R.id.iv_call);
tv_order_info = findViewById(R.id.tv_order_info); tv_order_info = findViewById(R.id.tv_order_info);
...@@ -78,7 +76,6 @@ public class ConfideOrderInfoView extends RelativeLayout { ...@@ -78,7 +76,6 @@ public class ConfideOrderInfoView extends RelativeLayout {
//有未完成订单 //有未完成订单
if (info.hasAvailableListenOrder == 2) { if (info.hasAvailableListenOrder == 2) {
tv_status.setText("剩余时间:" + coverTime(Integer.valueOf(info.listenOrderRemainTime))); tv_status.setText("剩余时间:" + coverTime(Integer.valueOf(info.listenOrderRemainTime)));
tv_tips.setVisibility(View.GONE);
if (info.is_online == 3) { //通话中 if (info.is_online == 3) { //通话中
...@@ -98,7 +95,6 @@ public class ConfideOrderInfoView extends RelativeLayout { ...@@ -98,7 +95,6 @@ public class ConfideOrderInfoView extends RelativeLayout {
tv_action.setBackground(getResources().getDrawable(R.drawable.im_background_chat_confide_order_action)); tv_action.setBackground(getResources().getDrawable(R.drawable.im_background_chat_confide_order_action));
tv_action.setTextColor(getResources().getColor(R.color.im_white)); tv_action.setTextColor(getResources().getColor(R.color.im_white));
tv_action.setText("去评价"); tv_action.setText("去评价");
tv_tips.setVisibility(View.VISIBLE);
} }
tv_order_info.setText(info.listenOrderDesc); tv_order_info.setText(info.listenOrderDesc);
} }
......
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<merge xmlns:android="http://schemas.android.com/apk/res/android" <merge xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools" xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
tools:parentTag="android.widget.RelativeLayout"> tools:parentTag="android.widget.RelativeLayout">
<TextView <TextView
android:id="@+id/tv_order_style" android:id="@+id/tv_order_style"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginLeft="15dp" android:layout_marginLeft="15dp"
android:layout_marginTop="18dp" android:layout_marginTop="18dp"
android:background="@drawable/im_background_chat_confide_order_stytle" android:background="@drawable/im_background_chat_confide_order_stytle"
android:paddingLeft="5dp" android:paddingLeft="5dp"
android:paddingRight="5dp" android:paddingRight="5dp"
android:text="倾诉" android:text="倾诉"
android:textColor="@color/platform_color_1DA1F2" android:textColor="@color/platform_color_1DA1F2"
android:textSize="11sp" /> android:textSize="11sp" />
<TextView <TextView
android:id="@+id/tv_status" android:id="@+id/tv_status"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginLeft="6dp" android:layout_marginLeft="6dp"
android:layout_marginTop="16dp" android:layout_marginTop="16dp"
android:layout_toRightOf="@+id/tv_order_style" android:layout_toRightOf="@+id/tv_order_style"
android:textColor="@color/im_color_242424" android:textColor="@color/im_color_242424"
android:textSize="15sp" android:textSize="15sp"
android:textStyle="bold" android:textStyle="bold"
tools:text="已结束" /> tools:text="已结束" />
<TextView <TextView
android:id="@+id/tv_order_info" android:id="@+id/tv_order_info"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_below="@+id/tv_order_style" android:layout_below="@+id/tv_order_style"
android:layout_marginLeft="15dp" android:layout_marginLeft="15dp"
android:layout_marginTop="7dp" android:layout_marginTop="7dp"
android:layout_marginBottom="13dp" android:layout_marginBottom="13dp"
android:textColor="@color/platform_color_999999" android:textColor="@color/platform_color_999999"
android:textSize="11sp" android:textSize="11sp"
android:textStyle="bold" android:textStyle="bold"
tools:text="电话倾诉 倾诉时长:25分钟 2018.11.24 " /> tools:text="电话倾诉 倾诉时长:25分钟 2018.11.24 " />
<ImageView <ImageView
android:id="@+id/iv_call" android:id="@+id/iv_call"
android:layout_width="36dp" android:layout_width="36dp"
android:layout_height="36dp" android:layout_height="36dp"
android:layout_alignParentRight="true" android:layout_alignParentRight="true"
android:layout_centerVertical="true" android:layout_centerVertical="true"
android:layout_marginRight="15dp" android:layout_marginRight="15dp"
android:src="@drawable/im_icon_qingsu_call" android:src="@drawable/im_icon_qingsu_call"
android:visibility="gone" /> android:visibility="gone" />
<TextView <TextView
android:id="@+id/tv_action" android:id="@+id/tv_action"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_alignParentRight="true" android:layout_alignParentRight="true"
android:layout_centerVertical="true" android:layout_centerVertical="true"
android:layout_marginRight="15dp" android:layout_marginRight="15dp"
android:paddingLeft="14dp" android:paddingLeft="14dp"
android:paddingTop="4dp" android:paddingTop="4dp"
android:paddingRight="14dp" android:paddingRight="14dp"
android:paddingBottom="4dp" android:paddingBottom="4dp"
android:textColor="@color/im_white" android:textColor="@color/im_white"
tools:background="@drawable/im_background_chat_confide_order_action" tools:background="@drawable/im_background_chat_confide_order_action"
tools:text="去评价" /> tools:text="去评价" />
</merge>
<TextView
android:id="@+id/tv_tips"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:background="@drawable/im_background_chat_confide_order_tpis"
android:paddingLeft="5dp"
android:paddingTop="1dp"
android:paddingRight="5dp"
android:paddingBottom="1dp"
android:text="最高返30元红包"
android:textColor="@color/im_white"
android:textSize="9sp"
android:visibility="gone" />
</merge>
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