diff --git a/app/src/main/java/com/mogo/launcher/startup/ConfigStartUp.kt b/app/src/main/java/com/mogo/launcher/startup/ConfigStartUp.kt
index ab78361cd1..6e70b33d3e 100644
--- a/app/src/main/java/com/mogo/launcher/startup/ConfigStartUp.kt
+++ b/app/src/main/java/com/mogo/launcher/startup/ConfigStartUp.kt
@@ -12,10 +12,12 @@ import com.mogo.eagle.core.utilcode.util.GsonUtils
import com.mogo.launcher.BuildConfig
import com.mogo.launcher.R
import com.mogo.test.crashreport.CrashReportConstants
+import com.shuyu.gsyvideoplayer.player.IjkPlayerManager
import com.zhidaoauto.map.sdk.open.HDTypes
import com.zhidaoauto.map.sdk.open.MapAutoApi
import com.zhidaoauto.map.sdk.open.MapParams
import com.zhjt.mogo_core_function_devatools.env.EnvChangeManager
+import tv.danmaku.ijk.media.player.IjkMediaPlayer
object ConfigStartUp {
@@ -27,6 +29,9 @@ object ConfigStartUp {
}
private fun initBuildConfig() {
+ //ijk关闭log
+ IjkPlayerManager.setLogLevel(IjkMediaPlayer.IJK_LOG_SILENT);
+
// 初始化构建APP的时候的分支及提交HASH,用于辅助定位问题
AppConfigInfo.workingBranchName = BuildConfig.WORKING_BRANCH_NAME
AppConfigInfo.workingBranchHash = BuildConfig.WORKING_BRANCH_HASH
diff --git a/config.gradle b/config.gradle
index aa0cfc053e..dc2bd1e3d3 100644
--- a/config.gradle
+++ b/config.gradle
@@ -132,8 +132,8 @@ ext {
crashreport : "com.mogo.test:crashreport:${CRASHREPORT_VERSION}",
crashreportapmbyte : "com.mogo.test:crashreport-apmbyte:${CRASHREPORT_APMBYTE_VERSION}",
crashreportnoop : "com.mogo.test:crashreport-noop:${CRASHREPORT_NOOP_VERSION}",
- apm_insight : 'com.volcengine:apm_insight:1.4.9.cn-rc.5',
- apm_insight_crash : 'com.volcengine:apm_insight_crash:1.4.6-rc.14',
+ apm_insight : 'com.volcengine:apm_insight:1.4.10.cn-rc.0',
+ apm_insight_crash : 'com.volcengine:apm_insight_crash:1.4.6-rc.17',
cicle_indicator : 'me.relex:circleindicator:2.1.6',
//========================= TTS语音 Maven 版本管理 =========================
diff --git a/core/function-impl/mogo-core-function-datacenter/src/main/java/com/mogo/eagle/core/function/datacenter/obu/MogoPrivateObuNewManager.kt b/core/function-impl/mogo-core-function-datacenter/src/main/java/com/mogo/eagle/core/function/datacenter/obu/MogoPrivateObuNewManager.kt
index 6046849510..ec4ff4a718 100644
--- a/core/function-impl/mogo-core-function-datacenter/src/main/java/com/mogo/eagle/core/function/datacenter/obu/MogoPrivateObuNewManager.kt
+++ b/core/function-impl/mogo-core-function-datacenter/src/main/java/com/mogo/eagle/core/function/datacenter/obu/MogoPrivateObuNewManager.kt
@@ -109,7 +109,6 @@ class MogoPrivateObuNewManager private constructor() : OnUpgradeListener {
override fun onCurrentVersion(version: MogoObuSystemBConfigData) {
CallerLogger.d("$M_OBU${MogoObuConst.TAG_UPGRADE_OBU}", "onCurrentVersion version = ${version.version}")
if (!version.version.isNullOrEmpty()) {
- CallerObuInfoListenerManager.invokeObuVersionName(version.version)
CallerDevaToolsManager.queryObuUpgrade(version.version)
}
}
@@ -200,7 +199,7 @@ class MogoPrivateObuNewManager private constructor() : OnUpgradeListener {
* @param data 系统状态
*/
override fun onObuSystemStatus(data: MogoObuSystemStatusData?) {
-
+ CallerObuInfoListenerManager.invokeGetObuInfo(data.toString())
}
/**
diff --git a/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/setting/DebugSettingView.kt b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/setting/DebugSettingView.kt
index e632d3458f..0a181f91dc 100644
--- a/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/setting/DebugSettingView.kt
+++ b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/setting/DebugSettingView.kt
@@ -152,8 +152,7 @@ internal class DebugSettingView @JvmOverloads constructor(
//OBU连接状态
private var obuConnectStatus: Boolean = false
- private var mObuVersionName: String = ""
- private var mObuDeviceId: String = ""
+ private var mObuInfoStr: String = ""
//渠道包标签
private var onlineSelected: Boolean = true
@@ -574,7 +573,7 @@ internal class DebugSettingView @JvmOverloads constructor(
setLogCheckedChangeListener()
//OBU配置信息
- tvObuInfo.text = CallerObuConnectListenerManager.getObuStatusInfoJsonString()
+// tvObuInfo.text = CallerObuConnectListenerManager.getObuStatusInfoJsonString()
//工控机配置信息
tvAutopilotInfo.text =
@@ -1537,7 +1536,6 @@ internal class DebugSettingView @JvmOverloads constructor(
}"
)
-
tvServerSocketStatus.text = Html.fromHtml(
"服务器Socket状态:${
if (MogoStatusManager.getInstance().isSocketOnLine) {
@@ -1645,10 +1643,8 @@ internal class DebugSettingView @JvmOverloads constructor(
tbIsDemoMode.text = "开启美化模式"
}
- //obu TODO 后面会添加很多os那边需要显示的内容
- obuVersionNameTv.text = Html.fromHtml(
- "OBU版本号:$mObuVersionName"
- )
+ //obu信息,排查obu相关问题使用
+ tvObuInfoContent.text = mObuInfoStr
obuConnectStatusTv.text = Html.fromHtml(
"OBU连接状态:${
@@ -1667,7 +1663,7 @@ internal class DebugSettingView @JvmOverloads constructor(
*/
override fun onConnectStatus(obuStatusInfo: ObuStatusInfo) {
lifecycleOwner.lifecycleScope.launch {
- tvObuInfo.text = GsonUtils.toJson(obuStatusInfo)
+// tvObuInfo.text = GsonUtils.toJson(obuStatusInfo)
AppConfigInfo.obuSdkVersion = obuStatusInfo.obuSdkVersion
AppConfigInfo.isConnectObu = obuStatusInfo.obuStatus
@@ -2058,12 +2054,7 @@ internal class DebugSettingView @JvmOverloads constructor(
setLogCheckedChangeListener()
}
- override fun onGetObuVersionName(obuVersionName: String) {
- mObuVersionName = obuVersionName
+ override fun onGetObuInfo(obuInfoStr: String) {
+ mObuInfoStr = obuInfoStr
}
-
- override fun onObuDeviceId(obuDeviceId: String) {
- mObuDeviceId = obuDeviceId
- }
-
}
\ No newline at end of file
diff --git a/core/function-impl/mogo-core-function-hmi/src/main/res/layout/view_debug_setting.xml b/core/function-impl/mogo-core-function-hmi/src/main/res/layout/view_debug_setting.xml
index 27f6125ab9..7209e1a718 100644
--- a/core/function-impl/mogo-core-function-hmi/src/main/res/layout/view_debug_setting.xml
+++ b/core/function-impl/mogo-core-function-hmi/src/main/res/layout/view_debug_setting.xml
@@ -1086,16 +1086,16 @@
android:background="#F0F0F0"
app:layout_constraintTop_toBottomOf="@id/btnSetObuIP" />
-
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
+
+
+
+
+
diff --git a/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/business/identify/TrackManager.java b/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/business/identify/TrackManager.java
index cd011c9c6d..363bae8ae8 100644
--- a/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/business/identify/TrackManager.java
+++ b/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/business/identify/TrackManager.java
@@ -125,7 +125,7 @@ public class TrackManager {
cellIdCaches.forcePut(uuid, trackObj.getCellIdPos());
mMarkersCaches.put(uuid, trackObj);
trafficDataUuid.add(uuid);
- Log.i("costTime","" + (System.currentTimeMillis() - cost));
+ //Log.i("costTime","" + (System.currentTimeMillis() - cost));
}
return mFilterTrafficData;
}
diff --git a/core/mogo-core-function-api/src/main/java/com/mogo/eagle/core/function/api/datacenter/obu/IMoGoObuInfoListener.kt b/core/mogo-core-function-api/src/main/java/com/mogo/eagle/core/function/api/datacenter/obu/IMoGoObuInfoListener.kt
index 82703fba36..f4c9d0dcfd 100644
--- a/core/mogo-core-function-api/src/main/java/com/mogo/eagle/core/function/api/datacenter/obu/IMoGoObuInfoListener.kt
+++ b/core/mogo-core-function-api/src/main/java/com/mogo/eagle/core/function/api/datacenter/obu/IMoGoObuInfoListener.kt
@@ -9,14 +9,8 @@ package com.mogo.eagle.core.function.api.datacenter.obu
interface IMoGoObuInfoListener {
/**
- * @param obuVersionName OBU硬件版本
+ * @param obuInfoStr OBU信息
*/
- fun onGetObuVersionName(obuVersionName: String)
-
- /**
- * obuDeviceId
- */
- fun onObuDeviceId(obuDeviceId: String)
-
+ fun onGetObuInfo(obuInfoStr: String)
}
\ No newline at end of file
diff --git a/core/mogo-core-function-call/src/main/java/com/mogo/eagle/core/function/call/obu/CallerObuInfoListenerManager.kt b/core/mogo-core-function-call/src/main/java/com/mogo/eagle/core/function/call/obu/CallerObuInfoListenerManager.kt
index de793b087d..b93cf4932e 100644
--- a/core/mogo-core-function-call/src/main/java/com/mogo/eagle/core/function/call/obu/CallerObuInfoListenerManager.kt
+++ b/core/mogo-core-function-call/src/main/java/com/mogo/eagle/core/function/call/obu/CallerObuInfoListenerManager.kt
@@ -9,25 +9,12 @@ import com.mogo.eagle.core.function.call.base.CallerBase
*/
object CallerObuInfoListenerManager : CallerBase() {
- fun invokeObuVersionName(obuVersionName: String) {
+ fun invokeGetObuInfo(obuInfoStr: String) {
M_LISTENERS.forEach {
val listener = it.value
- listener.onGetObuVersionName(obuVersionName)
+ listener.onGetObuInfo(obuInfoStr)
}
}
- fun invokeObuDeviceId(obuDeviceId: String) {
- M_LISTENERS.forEach {
- val listener = it.value
- listener.onObuDeviceId(obuDeviceId)
- }
- }
-
-// fun invokeQueryContainersResponse(dockerList: List) {
-// M_LISTENERS.forEach {
-// val listener = it.value
-// //TODO
-// }
-// }
}
\ No newline at end of file
diff --git a/gradle.properties b/gradle.properties
index 3ad9e317b6..b417f92818 100644
--- a/gradle.properties
+++ b/gradle.properties
@@ -66,23 +66,23 @@ SERVICE_BIZ_VERSION=1.2.4
LOGLIB_VERSION=1.5.11
######## MogoAiCloudSDK Version ########
# 网络请求LOGLIB_VERSION
-MOGO_NETWORK_VERSION=1.4.5.7
+MOGO_NETWORK_VERSION=1.4.5.10
# 鉴权
-MOGO_PASSPORT_VERSION=1.4.5.7
+MOGO_PASSPORT_VERSION=1.4.5.10
# 常链接
-MOGO_SOCKET_VERSION=1.4.5.7
+MOGO_SOCKET_VERSION=1.4.5.10
# 数据采集
-MOGO_REALTIME_VERSION=1.4.5.7
+MOGO_REALTIME_VERSION=1.4.5.10
# 探路,道路事件发布,获取
-MOGO_TANLU_VERSION=1.4.5.7
+MOGO_TANLU_VERSION=1.4.5.10
# 直播推流
-MOGO_LIVE_VERSION=1.4.5.7
+MOGO_LIVE_VERSION=1.4.5.10
# 直播拉流
-MOGO_TRAFFICLIVE_VERSION=1.4.5.7
+MOGO_TRAFFICLIVE_VERSION=1.4.5.10
# 定位服务
-MOGO_LOCATION_VERSION=1.4.5.7
+MOGO_LOCATION_VERSION=1.4.5.10
# 远程通讯模块
-MOGO_TELEMATIC_VERSION=1.4.5.7
+MOGO_TELEMATIC_VERSION=1.4.5.10
######## MogoAiCloudSDK Version ########
# 自研地图
MAP_SDK_VERSION=2.10.0.9
diff --git a/libraries/mogo-map/src/main/java/com/mogo/map/AMapViewWrapper.java b/libraries/mogo-map/src/main/java/com/mogo/map/AMapViewWrapper.java
index b682990656..806d4d75f7 100644
--- a/libraries/mogo-map/src/main/java/com/mogo/map/AMapViewWrapper.java
+++ b/libraries/mogo-map/src/main/java/com/mogo/map/AMapViewWrapper.java
@@ -4,7 +4,6 @@ import static com.mogo.eagle.core.data.deva.chain.ChainConstant.CHAIN_ALIAS_CODE
import static com.mogo.eagle.core.data.deva.chain.ChainConstant.CHAIN_ALIAS_CODE_INIT_ON_MAP_LOADED;
import static com.mogo.eagle.core.data.deva.chain.ChainConstant.CHAIN_LINK_INIT;
import static com.mogo.eagle.core.data.deva.chain.ChainConstant.CHAIN_LINK_LOG_CONNECT_STATUS;
-import static com.mogo.eagle.core.utilcode.mogo.logger.Logger.d;
import static com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.M_MAP;
import static com.mogo.map.uicontroller.VisualAngleMode.MAP_STYLE_VR_ANGLE_300;
import static com.mogo.map.uicontroller.VisualAngleMode.MAP_STYLE_VR_ANGLE_CROSS;
@@ -41,8 +40,8 @@ import com.mogo.eagle.core.function.call.map.CallerMapDevaListenerManager;
import com.mogo.eagle.core.function.call.map.CallerMapRoadListenerManager;
import com.mogo.eagle.core.function.call.map.CallerMapStyleListenerManager;
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger;
-import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant;
import com.mogo.eagle.core.utilcode.mogo.toast.TipToast;
+import com.mogo.eagle.core.utilcode.util.ThreadUtils;
import com.mogo.eagle.core.utilcode.util.UiThreadHandler;
import com.mogo.map.hdcache.IHdCacheListener;
import com.mogo.map.listener.MogoMapListenerHandler;
@@ -168,17 +167,19 @@ public class AMapViewWrapper implements IMogoMapView,
return;
}
MapAutoViewHelper options = mMapView.getMapAutoViewHelper();
- if (options != null) {
- //设置手势是否可以缩放 isCanZoom true 可缩放 false 不可缩放
- options.setZoomGesturesEnabled(true);
- options.setScaleVRMode(true);
+ ThreadUtils.getIoPool().submit(() -> {
+ if (options != null) {
+ //设置手势是否可以缩放 isCanZoom true 可缩放 false 不可缩放
+ options.setZoomGesturesEnabled(true);
+ options.setScaleVRMode(true);
// options.setAllGesturesEnabled(false); //禁止全部手势
- if (options.getMyLocationStyle() != null) {
- options.getMyLocationStyle().setDisplayAnimEnable(true);
+ if (options.getMyLocationStyle() != null) {
+ options.getMyLocationStyle().setDisplayAnimEnable(true);
+ }
+ //修改自车模型,未来需区分车的类型
+ options.setMyLocationStyle(options.getMyLocationStyle().myLocationIcon(HdMapBuildConfig.currentCarVrIconRes, true));
}
- //修改自车模型,未来需区分车的类型
- options.setMyLocationStyle(options.getMyLocationStyle().myLocationIcon(HdMapBuildConfig.currentCarVrIconRes, true));
- }
+ });
}
private void initListeners() {
diff --git a/libraries/mogo-map/src/main/java/com/mogo/map/location/GDLocationClient.kt b/libraries/mogo-map/src/main/java/com/mogo/map/location/GDLocationClient.kt
index 6edc26bd3c..a9f26b224c 100644
--- a/libraries/mogo-map/src/main/java/com/mogo/map/location/GDLocationClient.kt
+++ b/libraries/mogo-map/src/main/java/com/mogo/map/location/GDLocationClient.kt
@@ -77,7 +77,7 @@ class GDLocationClient private constructor(context: Context) : AMapLocationListe
lastGaoDeLocation.lastReceiveTime = TimeUtils.getNowMills()
// 将高德中的一些用于业务的数据进行融合,例如:CityCode、address等
- mapLocation?.let {
+ aMapLocation.let {
// 转换 GCJ02-->WGS84 坐标
val wgs84Location =
CoordinateTransform.GCJ02ToWGS84(it.longitude, it.latitude)
@@ -112,17 +112,17 @@ class GDLocationClient private constructor(context: Context) : AMapLocationListe
lastGaoDeLocation.errorInfo = it.errorInfo
}
- // 回掉给监听者
- CallerGaoDeMapLocationListenerManager.invokeMoGoLocationChanged(lastGaoDeLocation)
-
- mapLocation = aMapLocation
- // 本地SP缓存城市Code
- val cityCode = aMapLocation.cityCode
- if (cityCode != null && cityCode.isNotEmpty()) {
- mCityCode = aMapLocation.cityCode
- SharedPrefsMgr.getInstance(AbsMogoApplication.getApp())
- .putString(SharedPrefsConstants.LOCATION_CITY_CODE, cityCode)
+ try {
+ mapLocation = aMapLocation
+ // 本地SP缓存城市Code
+ val cityCode = aMapLocation.cityCode
+ if (cityCode != null && cityCode.isNotEmpty()) {
+ mCityCode = aMapLocation.cityCode
+ SharedPrefsMgr.getInstance(AbsMogoApplication.getApp())
+ .putString(SharedPrefsConstants.LOCATION_CITY_CODE, cityCode)
+ }
+ // 缓存经纬度
SharedPrefsMgr.getInstance(AbsMogoApplication.getApp())
.putString(
SharedPrefsConstants.LOCATION_LATITUDE,
@@ -133,7 +133,11 @@ class GDLocationClient private constructor(context: Context) : AMapLocationListe
SharedPrefsConstants.LOCATION_LONGITUDE,
aMapLocation.longitude.toString()
)
+ } catch (e: Exception) {
+ e.printStackTrace()
}
+ // 回掉给监听者
+ CallerGaoDeMapLocationListenerManager.invokeMoGoLocationChanged(lastGaoDeLocation)
}
}
diff --git a/test/crashreport-apmbyte/build.gradle b/test/crashreport-apmbyte/build.gradle
index eeab9e0aa8..65f85c0980 100644
--- a/test/crashreport-apmbyte/build.gradle
+++ b/test/crashreport-apmbyte/build.gradle
@@ -39,6 +39,10 @@ android {
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
+ compileOptions {
+ sourceCompatibility JavaVersion.VERSION_1_8
+ targetCompatibility JavaVersion.VERSION_1_8
+ }
}
dependencies {
diff --git a/test/crashreport-apmbyte/src/main/java/com/mogo/test/crashreport/apm/ApmCrashReportProvider.java b/test/crashreport-apmbyte/src/main/java/com/mogo/test/crashreport/apm/ApmCrashReportProvider.java
index 30588f1161..0f953a63cf 100644
--- a/test/crashreport-apmbyte/src/main/java/com/mogo/test/crashreport/apm/ApmCrashReportProvider.java
+++ b/test/crashreport-apmbyte/src/main/java/com/mogo/test/crashreport/apm/ApmCrashReportProvider.java
@@ -3,8 +3,6 @@ package com.mogo.test.crashreport.apm;
import android.content.Context;
import com.alibaba.android.arouter.facade.annotation.Route;
-import com.apm.insight.AttachUserData;
-import com.apm.insight.CrashType;
import com.apm.insight.MonitorCrash;
import com.apm.insight.log.VLog;
import com.bytedance.apm.insight.ApmInsight;
@@ -12,8 +10,9 @@ import com.bytedance.apm.insight.ApmInsightAgent;
import com.bytedance.apm.insight.ApmInsightInitConfig;
import com.mogo.commons.constants.SharedPrefsConstants;
import com.mogo.commons.debug.DebugConfig;
-import com.mogo.eagle.core.data.deva.bindingcar.CarInfo;
+import com.mogo.eagle.core.data.app.AppConfigInfo;
import com.mogo.eagle.core.data.config.FunctionBuildConfig;
+import com.mogo.eagle.core.data.deva.bindingcar.CarInfo;
import com.mogo.eagle.core.function.api.devatools.apm.IApmEnvProvider;
import com.mogo.eagle.core.function.call.devatools.CallerDevaToolsManager;
import com.mogo.eagle.core.utilcode.mogo.AppIdentityModeUtils;
@@ -22,11 +21,11 @@ import com.mogo.eagle.core.utilcode.mogo.storage.SharedPrefsMgr;
import com.mogo.eagle.core.utilcode.util.CommonUtils;
import com.mogo.eagle.core.utilcode.util.DeviceUtils;
import com.mogo.eagle.core.utilcode.util.GsonUtils;
+import com.mogo.eagle.core.utilcode.util.MetaDataUtils;
import com.mogo.test.crashreport.CrashReportConstants;
import com.mogo.test.crashreport.ITestCrashReportProvider;
import java.util.HashMap;
-import java.util.Map;
/**
@@ -38,7 +37,9 @@ import java.util.Map;
@Route(path = CrashReportConstants.PATH)
public class ApmCrashReportProvider implements ITestCrashReportProvider {
private static final String BYTEAMP_APPID = "302368";
+ private static final String BYTEAMP_AppToken = "de428a1a8b204c82ac60088aaf9205a3";
private static final String BYTEAMP_APPID_DEV = "379950";
+ private static final String BYTEAMP_AppToken_DEV = "3a78191bc18842118c5b4515ec9bfefc";
private static final String TAG = "ApmCrashReportProvider";
private static final String MAP_SDK_VERSION = "MAP_SDK_VERSION";
@@ -49,11 +50,6 @@ public class ApmCrashReportProvider implements ITestCrashReportProvider {
@Override
public void init(Context context) {
- initCrash(context);
- initApmInsight(context);
- }
-
- private void initCrash(final Context context) {
IApmEnvProvider provider = CallerDevaToolsManager.INSTANCE.apmEnvProvider();
boolean isDebug = DebugConfig.isDebug();
if (provider != null) {
@@ -62,85 +58,167 @@ public class ApmCrashReportProvider implements ITestCrashReportProvider {
isDebug = enabled;
}
}
- MonitorCrash crash = MonitorCrash.init(context, isDebug ? BYTEAMP_APPID_DEV : BYTEAMP_APPID, CommonUtils.getVersionCode(context), CommonUtils.getVersionName(context))
- .setCustomDataCallback(new AttachUserData() {
- @Override
- public Map extends String, ? extends String> getUserData(CrashType type) {
- HashMap map = new HashMap<>();
- //车辆信息
- String carInfoString = SharedPrefsMgr.getInstance(context).getString(SharedPrefsConstants.CAR_INFO);
+ initCrash(context, isDebug);
+ initApmInsight(context, isDebug);
+ }
- if (carInfoString != null && !carInfoString.isEmpty()) {
- mInfo = GsonUtils.fromJson(carInfoString, CarInfo.class);
- }
+ private void initCrash(final Context context, boolean isDebug) {
+ MonitorCrash.Config config =
+ MonitorCrash.Config
+ .app(isDebug ? BYTEAMP_APPID_DEV : BYTEAMP_APPID)
+ .token(isDebug ? BYTEAMP_AppToken_DEV : BYTEAMP_AppToken)// 设置鉴权token,可从平台应用信息处获取,token错误无法上报数据
+ .versionCode(CommonUtils.getVersionCode(context))// 可选,默认取PackageInfo中的versionCode
+ .versionName(CommonUtils.getVersionName(context))// 可选,默认取PackageInfo中的versionName
+ .channel(MetaDataUtils.getMetaDataInApp("BUGLY_APP_CHANNEL"))// 可选,设置App发布渠道,在平台可以筛选
+ // .url("www.xxx.com")// 默认不需要,私有化部署才配置上报地址
+ //可选,可以设置自定义 did,不设置会使用内部默认的
+ .dynamicParams(new MonitorCrash.Config.IDynamicParams() {
+ @Override
+ public String getDid() {//返回空会使用内部默认的did
+ String sn = SharedPrefsMgr.getInstance(context).getString("sn");
+ if (sn != null && !sn.isEmpty()) {
+ return sn;
+ } else {
+ return DeviceUtils.getDeviceSN().isEmpty() ? null : DeviceUtils.getDeviceSN();
+ }
+ }
- //车辆所在位置
- mCityCode = SharedPrefsMgr.getInstance(context).getString(SharedPrefsConstants.LOCATION_CITY_CODE);
- mLat = SharedPrefsMgr.getInstance(context).getString(SharedPrefsConstants.LOCATION_LATITUDE);
- mLogt = SharedPrefsMgr.getInstance(context).getString(SharedPrefsConstants.LOCATION_LONGITUDE);
- //地图版本
- String mapSDKVersion = DebugConfig.getMapVersion();
- map.put("MAP_SDK_VERSION", mapSDKVersion);
- map.put("CITYCODE", mCityCode);
- map.put("LATITUDE", mLat);
- map.put("LONGITUTE", mLogt);
+ @Override
+ public String getUserId() {
+ return DeviceUtils.getDeviceSN();
+ }
+ })
+ //应用崩溃后会执行这里,可选,添加业务自定义数据,在崩溃详情页->现场数据展示->自定义数据
+ .customData(crashType -> {
+ //车辆所在位置
+ mCityCode = SharedPrefsMgr.getInstance(context).getString(SharedPrefsConstants.LOCATION_CITY_CODE);
+ mLat = SharedPrefsMgr.getInstance(context).getString(SharedPrefsConstants.LOCATION_LATITUDE);
+ mLogt = SharedPrefsMgr.getInstance(context).getString(SharedPrefsConstants.LOCATION_LONGITUDE);
+ //车辆信息
+ String carInfoString = SharedPrefsMgr.getInstance(context).getString(SharedPrefsConstants.CAR_INFO);
+ if (carInfoString != null && !carInfoString.isEmpty()) {
+ mInfo = GsonUtils.fromJson(carInfoString, CarInfo.class);
+ }
- if (mInfo != null) {
- CallerLogger.INSTANCE.d(TAG, "nuber = " + mInfo.getNumber_plate() + "--brand = " + mInfo.getBrand() + "--modle = " + mInfo.getModel());
- map.put("PLATE_NUMBER", mInfo.getNumber_plate());
- map.put("BRAND", mInfo.getBrand());
- map.put("MODEL", mInfo.getModel());
- }
- return map;
- }
- });
- String mapSDKVersion = DebugConfig.getMapVersion();
- crash.config().setChannel("MAP_SDK_VERSION:" + mapSDKVersion);
- //可选,可以设置自定义did,不设置会使用内部默认的
- String sn = SharedPrefsMgr.getInstance(context).getString("sn");
- if (sn != null && !sn.isEmpty()) {
- crash.config().setDeviceId(sn);
- } else {
- crash.config().setDeviceId(DeviceUtils.getDeviceSN());
- }
- crash.addTags(MAP_SDK_VERSION, mapSDKVersion);
- crash.addTags("CITYCODE", mCityCode);
- crash.addTags("LATITUDE", mLat);
- crash.addTags("LONGITUTE", mLogt);
- crash.addTags("CAR_TYPE", AppIdentityModeUtils.INSTANCE.getBuildCarType(FunctionBuildConfig.appIdentityMode));
+ //======================================== 自定义维度值 begin========================================
+ HashMap dimension = new HashMap<>();
+ // dimension.put("Devices_SN_DeviceId", sn + "__" + DeviceUtils.getDeviceSN());
+ // dimension.put("Devices_SN_WidevineID_MD5", sn + "__" + DeviceIdUtils.getWidevineIDWithMd5(context));
+ // dimension.put("Devices_SN_WidevineID", sn + "__" + DeviceIdUtils.getWidevineID(context));
+ //************************************* APP构建的信息 ***********************************************
+ // Git版本信息
+ dimension.put("GIT_BRANCH", AppConfigInfo.INSTANCE.getWorkingBranchName());
+ dimension.put("GIT_HASH", AppConfigInfo.INSTANCE.getWorkingBranchHash());
+ // 地图版本
+ dimension.put("APP_MAP_SDK_VERSION", DebugConfig.getMapVersion());
+ // 渠道信息
+ dimension.put("APP_CHANNEL", MetaDataUtils.getMetaDataInApp("BUGLY_APP_CHANNEL"));
+ // 车辆类型
+ dimension.put("APP_CAR_TYPE", AppIdentityModeUtils.INSTANCE.getBuildCarType(FunctionBuildConfig.appIdentityMode));
+ //************************************* APP构建的信息 ***********************************************
-// crash.setReportUrl("www.xxx.com"); // 私有化部署:私有化部署才配置上报地址
-// crash.addTags("key", "value"); // 自定义筛选tag, 按需添加、可多次覆盖
+ //************************************* 与车辆连接的 IPC(工控机)、OBU 等信息 ***********************************************
+ // 连接的OBU 状态
+ dimension.put("OBU_CONNECT_STATUS", "" + AppConfigInfo.INSTANCE.isConnectObu());
+ // 车牌号,从工控机获取的数据
+ dimension.put("IPC_PLATE_NUMBER", AppConfigInfo.INSTANCE.getPlateNumber());
+ // 连接的工控机 状态
+ dimension.put("IPC_CONNECT_STATUS", "" + AppConfigInfo.INSTANCE.isConnectAutopilot());
+ // 连接的工控机 MAC地址
+ dimension.put("IPC_MAC", AppConfigInfo.INSTANCE.getIPCMacAddress());
+ // 连接的工控机 Docker版本
+ dimension.put("IPC_MAP_VERSION", AppConfigInfo.INSTANCE.getDockerVersion());
+ // 连接的工控机 Protocol版本
+ dimension.put("IPC_MAP_PROTOCOL_VERSION", "" + AppConfigInfo.INSTANCE.getProtocolVersionNumber());
+ //************************************* 与车辆连接的 IPC(工控机)、OBU 等信息 ***********************************************
- HashMap dimension = new HashMap<>();
- //维度值
- dimension.put("Devices_SN_DeviceId", sn + "__" + DeviceUtils.getDeviceSN());
-// dimension.put("Devices_SN_WidevineID_MD5", sn + "__" + DeviceIdUtils.getWidevineIDWithMd5(context));
-// dimension.put("Devices_SN_WidevineID", sn + "__" + DeviceIdUtils.getWidevineID(context));
- dimension.put(MAP_SDK_VERSION, mapSDKVersion);
- dimension.put("CITYCODE", mCityCode);
- dimension.put("LATITUDE", mLat);
- dimension.put("LONGITUTE", mLogt);
- if (mInfo != null) {
- dimension.put("PLATE_NUMBER", mInfo.getNumber_plate());
- dimension.put("BRAND", mInfo.getBrand());
- dimension.put("MODEL", mInfo.getModel());
- }
+ //************************************* 位置信息 ***********************************************
+ // 城市信息
+ dimension.put("LOCATION_CITY_CODE", mCityCode);
+ dimension.put("LOCATION_LATITUDE", mLat);
+ dimension.put("LOCATION_LONGITUTE", mLogt);
+ //************************************* 位置信息 ***********************************************
- HashMap metric = new HashMap<>();
- //指标值
- //metric.put("Devices_ID_metric", (double) 100);
- ApmInsightAgent.monitorEvent("Devices_ID_EVENT", dimension, metric);
+ //************************************* CMDB绑定的信息 ***********************************************
+ if (mInfo != null) {
+ dimension.put("CMDB_PLATE_NUMBER", mInfo.getNumber_plate());
+ dimension.put("CMDB_BRAND", mInfo.getBrand());
+ dimension.put("CMDB_MODEL", mInfo.getModel());
+ }
+ //************************************* CMDB绑定的信息 ***********************************************
+
+ HashMap metric = new HashMap<>();
+ //指标值
+ //metric.put("Devices_ID_metric", (double) 100);
+ ApmInsightAgent.monitorEvent("Devices_ID_EVENT", dimension, metric);
+ //======================================== 自定义维度值 end========================================
+
+
+ //===================================== 自定义收集一些信息,在崩溃详情页->现场数据展示->自定义数据 begin========================================
+ HashMap map = new HashMap<>();
+
+ //************************************* APP构建的信息 ***********************************************
+ // Git版本信息
+ map.put("GIT_BRANCH", AppConfigInfo.INSTANCE.getWorkingBranchName());
+ map.put("GIT_HASH", AppConfigInfo.INSTANCE.getWorkingBranchHash());
+ // 地图版本
+ map.put("APP_MAP_SDK_VERSION", DebugConfig.getMapVersion());
+ // 渠道信息
+ map.put("APP_CHANNEL", MetaDataUtils.getMetaDataInApp("BUGLY_APP_CHANNEL"));
+ // 车辆类型
+ map.put("APP_CAR_TYPE", AppIdentityModeUtils.INSTANCE.getBuildCarType(FunctionBuildConfig.appIdentityMode));
+ //************************************* APP构建的信息 ***********************************************
+
+ //************************************* 与车辆连接的 IPC(工控机)、OBU 等信息 ***********************************************
+ // 连接的OBU 状态
+ map.put("OBU_CONNECT_STATUS", "" + AppConfigInfo.INSTANCE.isConnectObu());
+ // 车牌号,从工控机获取的数据
+ map.put("IPC_PLATE_NUMBER", AppConfigInfo.INSTANCE.getPlateNumber());
+ // 连接的工控机 状态
+ map.put("IPC_CONNECT_STATUS", "" + AppConfigInfo.INSTANCE.isConnectAutopilot());
+ // 连接的工控机 MAC地址
+ map.put("IPC_MAC", AppConfigInfo.INSTANCE.getIPCMacAddress());
+ // 连接的工控机 Docker版本
+ map.put("IPC_MAP_VERSION", AppConfigInfo.INSTANCE.getDockerVersion());
+ // 连接的工控机 Protocol版本
+ map.put("IPC_MAP_PROTOCOL_VERSION", "" + AppConfigInfo.INSTANCE.getProtocolVersionNumber());
+ //************************************* 与车辆连接的 IPC(工控机)、OBU 等信息 ***********************************************
+
+ //************************************* 位置信息 ***********************************************
+ // 城市信息
+ map.put("LOCATION_CITY_CODE", mCityCode);
+ map.put("LOCATION_LATITUDE", mLat);
+ map.put("LOCATION_LONGITUTE", mLogt);
+ //************************************* 位置信息 ***********************************************
+
+
+ //************************************* CMDB绑定的信息 ***********************************************
+ if (mInfo != null) {
+ CallerLogger.INSTANCE.d(TAG, "nuber = " + mInfo.getNumber_plate() + "--brand = " + mInfo.getBrand() + "--modle = " + mInfo.getModel());
+ map.put("CMDB_PLATE_NUMBER", mInfo.getNumber_plate());
+ map.put("CMDB_BRAND", mInfo.getBrand());
+ map.put("CMDB_MODEL", mInfo.getModel());
+ }
+ //************************************* CMDB绑定的信息 ***********************************************
+
+ return map;
+ //===================================== 自定义收集一些信息,在崩溃详情页->现场数据展示->自定义数据 end========================================
+ })
+ // 可选,添加pv事件的自定义tag,可以用来筛选崩溃率计算的分母数据
+ //.pageViewTags(<