1、增加countly更改deviceID的时机。保证上报的问题可以与蘑菇平台的SN对应上。
This commit is contained in:
donghongyu-pc
2024-11-05 19:36:07 +08:00
parent 9bea5ed9c4
commit 95361ebc41
3 changed files with 11 additions and 3 deletions

View File

@@ -227,9 +227,6 @@ dependencies {
implementation project(':OCH:facade')
implementation 'com.mogo.cloud:countly-sdk:1.4.7.49.18-debug'
implementation 'com.mogo.cloud:countly-sdk-native:1.4.7.49.18-debug'
androidTestImplementation rootProject.ext.dependencies.androidx_test_core
androidTestImplementation rootProject.ext.dependencies.androidx_test_core_ktx
androidTestImplementation rootProject.ext.dependencies.androidx_unit_ext

View File

@@ -43,6 +43,7 @@ import com.mogo.eagle.core.utilcode.util.ThreadPoolService
import com.mogo.eagle.core.utilcode.util.TimeUtils
import com.rousetime.android_startup.AndroidStartup
import com.zhjt.service.chain.ChainLog
import ly.count.android.sdk.Countly
import kotlin.properties.Delegates
class HttpDnsStartUp : AndroidStartup<Boolean>(), IMoGoCloudListener {
@@ -237,6 +238,13 @@ class HttpDnsStartUp : AndroidStartup<Boolean>(), IMoGoCloudListener {
uploadLocPerFiveSecond()
gotToken = true
}
try {
// 通过服务器合并更改设备 ID, 首次安装app的设备没有蘑菇sn临时用devicesID待生成蘑菇ID后修改已上传的信息
Countly.sharedInstance().deviceId().changeWithMerge(sn)
} catch (e: Exception) {
e.printStackTrace()
}
}
override fun onError(code: Int, msg: String) {

View File

@@ -70,6 +70,9 @@ dependencies {
}
api 'com.mogo.cloud:countly-sdk:1.4.7.49.18-debug'
api 'com.mogo.cloud:countly-sdk-native:1.4.7.49.18-debug'
}
apply from: new File(rootProject.rootDir, "gradle/upload.gradle").toString()