新增 Adjust 埋点
This commit is contained in:
parent
fc78fd9d1d
commit
c28cc5b3b9
@ -21,6 +21,9 @@ import android.util.Log;
|
|||||||
import androidx.annotation.NonNull;
|
import androidx.annotation.NonNull;
|
||||||
import androidx.annotation.Nullable;
|
import androidx.annotation.Nullable;
|
||||||
|
|
||||||
|
import com.adjust.sdk.Adjust;
|
||||||
|
import com.adjust.sdk.AdjustConfig;
|
||||||
|
import com.adjust.sdk.LogLevel;
|
||||||
import com.alibaba.android.arouter.launcher.ARouter;
|
import com.alibaba.android.arouter.launcher.ARouter;
|
||||||
import com.alibaba.fastjson.JSON;
|
import com.alibaba.fastjson.JSON;
|
||||||
import com.alibaba.fastjson.JSONObject;
|
import com.alibaba.fastjson.JSONObject;
|
||||||
@ -443,6 +446,12 @@ public class AppContext extends CommonAppContext {
|
|||||||
configSPApp();
|
configSPApp();
|
||||||
//初始化美颜SDK
|
//初始化美颜SDK
|
||||||
// FaceManager.initFaceUnity(this);
|
// FaceManager.initFaceUnity(this);
|
||||||
|
//初始化Adjust
|
||||||
|
String appToken = "d6m0zj5a3k00";
|
||||||
|
String environment = AdjustConfig.ENVIRONMENT_SANDBOX;
|
||||||
|
AdjustConfig config = new AdjustConfig(this, appToken, environment);
|
||||||
|
config.setLogLevel(LogLevel.VERBOSE);
|
||||||
|
Adjust.onCreate(config);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -264,4 +264,10 @@ dependencies {
|
|||||||
|
|
||||||
//下标切换器 https://github.com/angcyo/DslTabLayout
|
//下标切换器 https://github.com/angcyo/DslTabLayout
|
||||||
api project(':TabLayout')
|
api project(':TabLayout')
|
||||||
|
|
||||||
|
//Adjust SDK
|
||||||
|
api 'com.adjust.sdk:adjust-android:4.38.5'
|
||||||
|
api 'com.android.installreferrer:installreferrer:2.2'
|
||||||
|
// Add the following if you're using the Adjust SDK inside web views on your app
|
||||||
|
api 'com.adjust.sdk:adjust-android-webbridge:4.38.5'
|
||||||
}
|
}
|
||||||
|
14
common/proguard-rules.pro
vendored
14
common/proguard-rules.pro
vendored
@ -29,3 +29,17 @@
|
|||||||
-keep class com.qiniu.**{*;}
|
-keep class com.qiniu.**{*;}
|
||||||
-keep class com.qiniu.**{public <init>();}
|
-keep class com.qiniu.**{public <init>();}
|
||||||
-ignorewarnings
|
-ignorewarnings
|
||||||
|
|
||||||
|
#adjust.sdk
|
||||||
|
-keep class com.adjust.sdk.** { *; }
|
||||||
|
-keep class com.google.android.gms.common.ConnectionResult {
|
||||||
|
int SUCCESS;
|
||||||
|
}
|
||||||
|
-keep class com.google.android.gms.ads.identifier.AdvertisingIdClient {
|
||||||
|
com.google.android.gms.ads.identifier.AdvertisingIdClient$Info getAdvertisingIdInfo(android.content.Context);
|
||||||
|
}
|
||||||
|
-keep class com.google.android.gms.ads.identifier.AdvertisingIdClient$Info {
|
||||||
|
java.lang.String getId();
|
||||||
|
boolean isLimitAdTrackingEnabled();
|
||||||
|
}
|
||||||
|
-keep public class com.android.installreferrer.** { *; }
|
@ -21,6 +21,8 @@ import android.widget.ImageView;
|
|||||||
import android.widget.LinearLayout;
|
import android.widget.LinearLayout;
|
||||||
import android.widget.TextView;
|
import android.widget.TextView;
|
||||||
|
|
||||||
|
import com.adjust.sdk.Adjust;
|
||||||
|
import com.adjust.sdk.AdjustEvent;
|
||||||
import com.alibaba.fastjson.JSON;
|
import com.alibaba.fastjson.JSON;
|
||||||
import com.alibaba.fastjson.JSONObject;
|
import com.alibaba.fastjson.JSONObject;
|
||||||
import com.blankj.utilcode.util.DeviceUtils;
|
import com.blankj.utilcode.util.DeviceUtils;
|
||||||
@ -374,6 +376,9 @@ public class RegisterActivity extends AbsActivity {
|
|||||||
public void onSuccess(int code, String msg, String[] info) {
|
public void onSuccess(int code, String msg, String[] info) {
|
||||||
if (code == 0) {
|
if (code == 0) {
|
||||||
//注册成功
|
//注册成功
|
||||||
|
//注册埋点
|
||||||
|
AdjustEvent adjustEvent = new AdjustEvent("h9yurf");
|
||||||
|
Adjust.trackEvent(adjustEvent);
|
||||||
login(phoneNum, pwd, mUuidDevice);
|
login(phoneNum, pwd, mUuidDevice);
|
||||||
OpenInstall.reportRegister();
|
OpenInstall.reportRegister();
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
Reference in New Issue
Block a user