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

@@ -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) {