[Bus/Taxi d 2.6.0]Bus/Taxi:埋点增加车牌、环境信息

This commit is contained in:
pangfan
2022-04-01 17:46:50 +08:00
parent 0d8ecec882
commit 1d2071d95f
4 changed files with 20 additions and 0 deletions

View File

@@ -56,5 +56,7 @@ class OchBusConst {
const val EVENT_PARAM_END_NAME = "end_name"
const val EVENT_PARAM_LINE_ID = "line_id"
const val EVENT_PARAM_START_RESULT = "start_autopilot" // true/false
const val EVENT_PARAM_PLATE_NUM = "plate_number" // 车牌号
const val EVENT_PARAM_ENV_ONLINE = "env_online" // 是否线上环境true/false
}
}

View File

@@ -1,6 +1,10 @@
package com.mogo.och.bus.util;
import android.text.TextUtils;
import com.mogo.cloud.passport.MoGoAiCloudClientConfig;
import com.mogo.commons.debug.DebugConfig;
import com.mogo.eagle.core.data.app.AppConfigInfo;
import com.mogo.eagle.core.function.call.analytics.AnalyticsManager;
import com.mogo.eagle.core.utilcode.util.DateTimeUtils;
import com.mogo.eagle.core.utilcode.util.UiThreadHandler;
@@ -25,11 +29,15 @@ public class OchBusAnalyticsUtil {
boolean send, String startName, String endName, int lineId) {
String sn = MoGoAiCloudClientConfig.getInstance().getSn();
String plateNum = AppConfigInfo.INSTANCE.getPlateNumber();
String dateTime = DateTimeUtils.getTimeText(
System.currentTimeMillis(), DateTimeUtils.yyyy_MM_dd_HH_mm_ss);
Map<String, Object> params = new HashMap<>();
params.put(OchBusConst.EVENT_PARAM_SN, sn);
params.put(OchBusConst.EVENT_PARAM_PLATE_NUM, TextUtils.isEmpty(plateNum) ? "" : plateNum);
params.put(OchBusConst.EVENT_PARAM_ENV_ONLINE,
DebugConfig.getNetMode() == DebugConfig.NET_MODE_RELEASE ? true : false);
params.put(OchBusConst.EVENT_PARAM_TIME, dateTime);
params.put(OchBusConst.EVENT_PARAM_START_NAME, startName);
params.put(OchBusConst.EVENT_PARAM_END_NAME, endName);

View File

@@ -58,6 +58,8 @@ class OCHTaxiConst {
const val EVENT_PARAM_END_NAME = "end_name"
const val EVENT_PARAM_ORDER_NUMBER = "order_num"
const val EVENT_PARAM_START_RESULT = "start_autopilot" // true/false
const val EVENT_PARAM_PLATE_NUM = "plate_number" // 车牌号
const val EVENT_PARAM_ENV_ONLINE = "env_online" // 是否线上环境true/false
// 实时计算当前剩余里程和时间 间隔 2秒
const val LOOP_CALCULATEROUTE_2S = 2 * 1000L

View File

@@ -1,6 +1,10 @@
package com.mogo.och.taxi.utils;
import android.text.TextUtils;
import com.mogo.cloud.passport.MoGoAiCloudClientConfig;
import com.mogo.commons.debug.DebugConfig;
import com.mogo.eagle.core.data.app.AppConfigInfo;
import com.mogo.eagle.core.function.call.analytics.AnalyticsManager;
import com.mogo.eagle.core.utilcode.util.DateTimeUtils;
import com.mogo.eagle.core.utilcode.util.UiThreadHandler;
@@ -25,11 +29,15 @@ public class OchTaxiAnalyticsUtil {
boolean send, String startName, String endName, String orderNo) {
String sn = MoGoAiCloudClientConfig.getInstance().getSn();
String plateNum = AppConfigInfo.INSTANCE.getPlateNumber();
String dateTime = DateTimeUtils.getTimeText(
System.currentTimeMillis(), DateTimeUtils.yyyy_MM_dd_HH_mm_ss);
Map<String, Object> params = new HashMap<>();
params.put(OCHTaxiConst.EVENT_PARAM_SN, sn);
params.put(OCHTaxiConst.EVENT_PARAM_PLATE_NUM, TextUtils.isEmpty(plateNum) ? "" : plateNum);
params.put(OCHTaxiConst.EVENT_PARAM_ENV_ONLINE,
DebugConfig.getNetMode() == DebugConfig.NET_MODE_RELEASE ? true : false);
params.put(OCHTaxiConst.EVENT_PARAM_TIME, dateTime);
params.put(OCHTaxiConst.EVENT_PARAM_START_NAME, startName);
params.put(OCHTaxiConst.EVENT_PARAM_END_NAME, endName);