|
|
@@ -3,10 +3,13 @@ package com.datarecovery.master;
|
|
|
import android.content.Context;
|
|
|
|
|
|
import com.atmob.app.lib.base.BaseApplication;
|
|
|
+import com.atmob.channelreader.ChannelReader;
|
|
|
import com.atmob.common.runtime.ProcessUtil;
|
|
|
+import com.atmob.sdk.appconvert.AppConvert;
|
|
|
import com.atmob.user.AtmobUser;
|
|
|
import com.datarecovery.master.data.consts.Constants;
|
|
|
import com.datarecovery.master.sdk.bugly.BuglyHelper;
|
|
|
+import com.datarecovery.master.sdk.central.AtmobCentralHelper;
|
|
|
import com.datarecovery.master.sdk.gravity.GravityHelper;
|
|
|
import com.datarecovery.master.sdk.qiyu.QiYuHelper;
|
|
|
import com.datarecovery.master.sdk.umeng.UmengHelper;
|
|
|
@@ -91,6 +94,8 @@ public class App extends BaseApplication {
|
|
|
if (isMainProcess) {
|
|
|
initBugly();
|
|
|
initUmeng();
|
|
|
+ initCentral();
|
|
|
+ initAppConvert();
|
|
|
}
|
|
|
}
|
|
|
|
|
|
@@ -102,6 +107,18 @@ public class App extends BaseApplication {
|
|
|
QiYuHelper.init(this);
|
|
|
}
|
|
|
|
|
|
+ private void initCentral() {
|
|
|
+ ChannelReader.default4Test(
|
|
|
+ Constants.App_DefaultChannel,
|
|
|
+ Constants.App_DefaultAppId,
|
|
|
+ Constants.App_DefaultTgPlatformId
|
|
|
+ );
|
|
|
+ String channel = ChannelReader.getChannel(this);
|
|
|
+ int appId = ChannelReader.getAppId(this);
|
|
|
+ int tgPlatformId = ChannelReader.getTgPlatformId(this);
|
|
|
+ AtmobCentralHelper.init(this, channel, appId, tgPlatformId);
|
|
|
+ }
|
|
|
+
|
|
|
private void initUmeng() {
|
|
|
UmengHelper.init(this);
|
|
|
}
|
|
|
@@ -110,8 +127,13 @@ public class App extends BaseApplication {
|
|
|
BuglyHelper.init(this);
|
|
|
}
|
|
|
|
|
|
+ private void initAppConvert() {
|
|
|
+ AppConvert.init();
|
|
|
+ }
|
|
|
+
|
|
|
public void firstPrivacyRelated() {
|
|
|
AtmobUser.recordPolicyGrant(true);
|
|
|
+ AtmobCentralHelper.onPolicyGranted(true);
|
|
|
UmengHelper.initAfterGrantedAgreement(getApplicationContext());
|
|
|
UmengHelper.submitPolicyGrantResult(getApplicationContext(), true);
|
|
|
BuglyHelper.initAfterGrantedAgreement();
|