Commit e613619d authored by mengcuiguang's avatar mengcuiguang

代码优化

parent 713061bc
......@@ -12,6 +12,8 @@ import com.duben.happyplayletu.utils.DeviceUuidFactory
import com.duben.happyplayletu.utils.LogUtil
import com.duben.happyplayletu.utils.MateUtils.getAppMetaData
import com.duben.library.utils.json.JsonUtil
import com.duben.happyplayletu.BuildConfig
import org.json.JSONObject
......@@ -37,6 +39,9 @@ object GravityEngineManager {
try {
// 在主线程中配置并启动SDK
val config: GEConfig = GEConfig.getInstance(application, ACCESS_TOKEN)
if (BuildConfig.DEBUG) {
config.mode = GEConfig.ModeEnum.DEBUG
}
// 保存此实例,后续调用方法均需要用到
val gravityEngineSDKInstance = GravityEngineSDK.setupAndStart(config)
gravityEngineSDKInstance.initialize(
......@@ -63,6 +68,8 @@ object GravityEngineManager {
ENABLE_SYNC_ATTRIBUTION
)
} catch (e: Exception) {
e.printStackTrace()
}
......
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