Commit b276c2f0 by 霍志良

Merge remote-tracking branch 'origin/release' into feat/hotwordconfignew

# Conflicts:
#	config.gradle
parents 79425cd9 446506b0
ext {
dev_mode = true //组件发布的时候需要设置为false
ydl2PublishVersion = "0.2.0.17-SNAPSHOT"
dev_mode = false //组件发布的时候需要设置为false
ydl2PublishVersion = "0.2.0.7"
ydlPublishVersion = [
// -------------- 业务模块 --------------
//第三步 若干
......
......@@ -5,6 +5,7 @@ import android.content.Context
import android.os.Handler
import android.text.TextUtils
import com.alibaba.android.arouter.launcher.ARouter
import com.apm.insight.log.VLog
import com.google.gson.Gson
import com.ydl.audioim.bean.AgoraInvitationBean
import com.ydl.audioim.http.AudioApiRequestUtil
......@@ -52,6 +53,7 @@ class YDLavManager {
companion object {
const val FILE_NAME = "consult.log"
private const val TAG = "YDLavManager"
//当前sdk的登录状态
var sdkStatus = -1
......@@ -429,7 +431,9 @@ class YDLavManager {
}
override fun onFailure(msg: String?) {
Apm.reportCustom("agora_login_error", msg ?: "", Exception(msg))
if (msg != "LOGIN_ERR_ALREADY_LOGGED_IN") {
Apm.reportCustom("agora_login_error", msg ?: "", Exception(msg))
}
LogUtil.e("[agora]实时消息登录失败:$msg")
writeAgoraLog(
"声网rtm登录失败:$msg-------Time:${
......@@ -647,7 +651,7 @@ class YDLavManager {
* */
override fun onConnectionStateChanged(state: Int, reason: Int) {
val msg = "state:${state},reason:${reason}"
Apm.reportCustom("agora_connectionstate_error", msg, Exception(msg))
VLog.i(TAG, msg)
sdkStatus = state
writeAgoraLog(
"声网rtm登录状态:${state}-------Time:${AudioLogUtils.format.format(Calendar.getInstance().time)}",
......
......@@ -458,7 +458,7 @@ class ExpertSearchActivity : BaseMvpActivity<IExpertSearchView, ExpertSearchPres
}
//筛选数据获取后回调
//获取筛选数据
override fun onHeadFetched(headData: HeadData?) {
//头部数据获取到后初始化筛选数据
this.headData = headData
......
......@@ -25,6 +25,8 @@ class ConsultBIConstants {
const val POSITION_CONSULT_COUNSELOR_LIST_PAGE_VISIT="consult_counselor_list_page_visit" // 咨询师列表页面浏览position
const val POSITION_YDL_USER_ASSOCIATE_WORD_VISIT="ydl_user_associate_word_visit" // 联想词曝光position
const val POSITION_YDL_USER_ASSOCIATE_WORD_CLICK="ydl_user_associate_word_click" // 联想词点击position
// 咨询师列表页 banner 点击事件
const val POSITION_CONSULT_COUNSELOR_LIST_BANNER_CLICK = "consult_counselor_list_banner_click"
}
//====================APP咨询列表页(app_consult_list_page)====================
......
......@@ -25,8 +25,6 @@ import com.yidianling.consultant.listener.OnFilterConfirmListener
import com.yidianling.consultant.model.bean.AllFilter
import com.yidianling.consultant.model.bean.Filters
import com.yidianling.consultant.model.bean.PriceRangesItem
import io.reactivex.disposables.CompositeDisposable
import io.reactivex.disposables.Disposable
import kotlinx.android.synthetic.main.consultant_item_filter.view.*
import kotlinx.android.synthetic.main.consultant_item_price_range.view.*
import kotlinx.android.synthetic.main.consultant_ui_filter_popup.view.*
......@@ -109,6 +107,9 @@ class FilterPopupWindow(
}
view.btnConfirm.setOnClickListener {
if (tempFilter.priceRanges?.key1 == "avg_price" && filterData.priceRanges.isNotEmpty()) {
tempFilter.priceRanges?.key1 = filterData.priceRanges[0].key1
}
biEvent(ConsultBIConstants.POSITION_CONSULT_FILTER_CHECKOUT_CLICK)
onFilterConfirmListener?.onFilterConfirmed()
dismiss()
......@@ -603,7 +604,8 @@ class FilterPopupWindow(
}
private fun initPriceViews(view: View) {
val priceRange = View.inflate(context, R.layout.consultant_item_price_range, null) as LinearLayout
val priceRange =
View.inflate(context, R.layout.consultant_item_price_range, null) as LinearLayout
etMinPrice = priceRange.findViewById(R.id.etMinPrice);
etMaxPrice = priceRange.findViewById(R.id.etMaxPrice);
......@@ -668,7 +670,11 @@ class FilterPopupWindow(
0
)
textView.layoutParams = params
val contentStr = String.format("%s\n%s", priceRangesItem.display_range, priceRangesItem.recommend_percent)
val contentStr = String.format(
"%s\n%s",
priceRangesItem.display_range,
priceRangesItem.recommend_percent
)
val msp = SpannableString(contentStr)
msp.setSpan(
AbsoluteSizeSpan(10, true),
......@@ -702,7 +708,10 @@ class FilterPopupWindow(
etMaxPrice?.setText("")
etMinPrice?.setText("")
} else {
tempFilter.priceRanges = priceRangesItem.copy(min_price = priceRangesItem.min_price, max_price = priceRangesItem.max_price)
tempFilter.priceRanges = priceRangesItem.copy(
min_price = priceRangesItem.min_price,
max_price = priceRangesItem.max_price
)
textView.isSelected = true
textView.paint.isFakeBoldText = true
tempFilter.priceRangesView = textView
......
......@@ -11,7 +11,7 @@ import com.ydl.ydl_image.module.GlideApp
import com.ydl.ydlcommon.utils.actionutil.ActionCountUtils
import com.yidianling.consultant.R
import com.yidianling.consultant.bean.ExpertSearchBigShotBean
import com.yidianling.consultant.constants.ConsultBIConstants.ConsultEvent.Companion.YDL_USER_CONSULT_TYPE_CLICK
import com.yidianling.consultant.constants.ConsultBIConstants
import kotlinx.android.synthetic.main.consultant_expert_search_big_shot_one.view.*
class BigShotOneView : LinearLayout {
......@@ -54,6 +54,10 @@ class BigShotOneView : LinearLayout {
consultant_one_img_1.setOnClickListener {
val h5Params = H5Params(bean.specialTopicUrl, null)
NewH5Activity.start(context, h5Params)
ActionCountUtils.count(
ConsultBIConstants.PART_ID_CONSULT_FILTER_PAGE + "|" + ConsultBIConstants.POSITION_CONSULT_COUNSELOR_LIST_BANNER_CLICK,
bean.specialTopicTitle
)
}
}
}
\ No newline at end of file
......@@ -8,8 +8,10 @@ import android.widget.LinearLayout
import com.ydl.webview.H5Params
import com.ydl.webview.NewH5Activity
import com.ydl.ydl_image.module.GlideApp
import com.ydl.ydlcommon.utils.actionutil.ActionCountUtils
import com.yidianling.consultant.R
import com.yidianling.consultant.bean.ExpertSearchBigShotBean
import com.yidianling.consultant.constants.ConsultBIConstants
import kotlinx.android.synthetic.main.consultant_expert_search_big_shot_three.view.*
class BigShotThreeView : LinearLayout {
......@@ -56,16 +58,31 @@ class BigShotThreeView : LinearLayout {
consultant_three_img_1.setOnClickListener {
val h5Params = H5Params(bean1.specialTopicUrl, null)
NewH5Activity.start(context, h5Params)
ActionCountUtils.count(
ConsultBIConstants.PART_ID_CONSULT_FILTER_PAGE + "|" + ConsultBIConstants.POSITION_CONSULT_COUNSELOR_LIST_BANNER_CLICK,
bean1.specialTopicTitle
)
}
mContext?.let { GlideApp.with(it).load(bean2.topicImages[2].imageUrl).into(consultant_three_img_2) }
consultant_three_img_2.setOnClickListener {
val h5Params = H5Params(bean2.specialTopicUrl, null)
NewH5Activity.start(context, h5Params)
ActionCountUtils.count(
ConsultBIConstants.PART_ID_CONSULT_FILTER_PAGE + "|" + ConsultBIConstants.POSITION_CONSULT_COUNSELOR_LIST_BANNER_CLICK,
bean2.specialTopicTitle
)
}
mContext?.let { GlideApp.with(it).load(bean3.topicImages[2].imageUrl).into(consultant_three_img_3) }
consultant_three_img_3.setOnClickListener {
val h5Params = H5Params(bean3.specialTopicUrl, null)
NewH5Activity.start(context, h5Params)
ActionCountUtils.count(
ConsultBIConstants.PART_ID_CONSULT_FILTER_PAGE + "|" + ConsultBIConstants.POSITION_CONSULT_COUNSELOR_LIST_BANNER_CLICK,
bean3.specialTopicTitle
)
}
}
......
......@@ -55,12 +55,22 @@ class BigShotTwoView : LinearLayout {
ActionCountUtils.count(ConsultBIConstants.ConsultEvent.YDL_USER_CONSULT_TYPE_CLICK,bean1.specialTopicTitle)
val h5Params = H5Params(bean1.specialTopicUrl, null)
NewH5Activity.start(context, h5Params)
ActionCountUtils.count(
ConsultBIConstants.PART_ID_CONSULT_FILTER_PAGE + "|" + ConsultBIConstants.POSITION_CONSULT_COUNSELOR_LIST_BANNER_CLICK,
bean1.specialTopicTitle
)
}
mContext?.let { GlideApp.with(it).load(bean2.topicImages[1].imageUrl).into(consultant_two_img_2) }
consultant_two_img_2.setOnClickListener {
ActionCountUtils.count(ConsultBIConstants.ConsultEvent.YDL_USER_CONSULT_TYPE_CLICK,bean2.specialTopicTitle)
val h5Params = H5Params(bean2.specialTopicUrl, null)
NewH5Activity.start(context, h5Params)
ActionCountUtils.count(
ConsultBIConstants.PART_ID_CONSULT_FILTER_PAGE + "|" + ConsultBIConstants.POSITION_CONSULT_COUNSELOR_LIST_BANNER_CLICK,
bean2.specialTopicTitle
)
}
}
......
......@@ -4,17 +4,16 @@ import android.content.Context
import android.util.AttributeSet
import android.view.View
import android.widget.LinearLayout
import com.alibaba.android.arouter.launcher.ARouter
import com.ydl.webview.H5Params
import com.ydl.webview.NewH5Activity
import com.ydl.ydl_image.module.GlideApp
import com.ydl.ydlcommon.base.config.HttpConfig
import com.ydl.ydlcommon.utils.actionutil.ActionCountUtils
import com.yidianling.common.tools.RxDeviceTool
import com.yidianling.common.tools.RxImageTool
import com.yidianling.consultant.R
import com.yidianling.consultant.bean.ExpertSearchRecommandBean
import com.yidianling.consultant.constants.ConsultBIConstants
import kotlinx.android.synthetic.main.consultant_expert_search_top_item_view.view.*
import java.net.URLDecoder
class RecommendItemView : LinearLayout {
......@@ -70,6 +69,11 @@ class RecommendItemView : LinearLayout {
setOnClickListener {
val h5Params = H5Params(bean.specialTopicUrl, null)
NewH5Activity.start(context, h5Params)
ActionCountUtils.count(
ConsultBIConstants.PART_ID_CONSULT_FILTER_PAGE + "|" + ConsultBIConstants.POSITION_CONSULT_COUNSELOR_LIST_BANNER_CLICK,
bean.specialTopicTitle
)
}
}
......
......@@ -534,6 +534,16 @@ public class AVChatActivity extends AVChatBaseUI implements AVChatVideoUI.TouchZ
avChatVideoUI.peerVideoOn();
}
break;
case AVChatControlCommand.NOTIFY_AUDIO_ON:
AliYunRichLogsHelper.Companion.getInstance()
.sendRichLog(AliYunLogConfig.YUNXIN, "handleCallControl 咨询师打开了麦克风");
break;
case AVChatControlCommand.NOTIFY_AUDIO_OFF:
AliYunRichLogsHelper.Companion.getInstance()
.sendRichLog(AliYunLogConfig.YUNXIN, "handleCallControl 咨询师关闭了麦克风");
break;
default:
ToastUtil.toastShort(this, "对方发来指令值:" + notification.getControlCommand());
break;
......
......@@ -12,7 +12,10 @@ object Apm {
private var crash: MonitorCrash? = null
private var hasInit = false
fun initApm(context: Context, appId: String, vCode: Long, vName: String, debug: Boolean, uidCall: () -> String?) {
if (debug) return
val channel = if (debug) "debug" else WalleChannelReader.getChannel(context)
crash = MonitorCrash.init(
context,
......@@ -27,7 +30,7 @@ object Apm {
//.cpuMonitor(true)
//.fpsMonitor(true)
//.seriousBlockDetect(true)
.blockDetect(true)
.blockDetect(false)
// .enableWebViewMonitor(true)
.channel(channel)
.debugMode(debug)
......@@ -35,10 +38,13 @@ object Apm {
.setDynamicParams(ApmParams(crash, uidCall))
ApmInsight.getInstance().init(context, builder.build())
VLog.init(context, 20)
hasInit = true
}
fun reportCustom(type: String, msg: String, throwable: Throwable) {
crash?.reportCustomErr(msg, type, throwable)
if (hasInit) {
crash?.reportCustomErr(msg, type, throwable)
}
}
}
......
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