Adjust集成
This commit is contained in:
@@ -249,9 +249,18 @@ dependencies {
|
||||
|
||||
implementation 'com.github.zhpanvip:BannerViewPager:3.5.6'
|
||||
|
||||
//fireBase
|
||||
implementation platform('com.google.firebase:firebase-bom:25.12.0')
|
||||
implementation 'com.google.firebase:firebase-analytics:21.0.0'
|
||||
|
||||
//Adjust接入
|
||||
implementation 'com.adjust.sdk:adjust-android:4.33.0'
|
||||
implementation 'com.android.installreferrer:installreferrer:2.2'
|
||||
// Add the following if you are using the Adjust SDK inside web views on your app
|
||||
implementation 'com.adjust.sdk:adjust-android-webbridge:4.33.0'
|
||||
//Google Play Referrer API
|
||||
implementation 'com.android.installreferrer:installreferrer:2.2'
|
||||
|
||||
}
|
||||
|
||||
channel {
|
||||
|
14
app/proguard-rules.pro
vendored
14
app/proguard-rules.pro
vendored
@@ -453,3 +453,17 @@
|
||||
-keep class android.support.v8.renderscript.** { *; }
|
||||
-keep class androidx.renderscript.** { *; }
|
||||
|
||||
-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.**{ *; }
|
||||
|
||||
-keep public class com.android.installreferrer.**{ *; }
|
@@ -177,6 +177,15 @@
|
||||
android:resource="@xml/provider_paths" />
|
||||
</provider>
|
||||
|
||||
<receiver
|
||||
android:name="com.adjust.sdk.AdjustReferrerReceiver"
|
||||
android:exported="true"
|
||||
android:permission="android.permission.INSTALL_PACKAGES">
|
||||
<intent-filter>
|
||||
<action android:name="com.android.vending.INSTALL_REFERRER" />
|
||||
</intent-filter>
|
||||
</receiver>
|
||||
|
||||
<activity
|
||||
android:name="com.darsh.multipleimageselect.activities.AlbumSelectActivity"
|
||||
android:configChanges="orientation|screenSize"
|
||||
|
@@ -4,6 +4,7 @@ import android.app.Activity;
|
||||
import android.app.Application;
|
||||
import android.os.Bundle;
|
||||
|
||||
import com.adjust.sdk.Adjust;
|
||||
import com.yizhuan.erban.location.LocationManager;
|
||||
import com.yizhuan.xchat_android_core.auth.AuthModel;
|
||||
|
||||
@@ -49,11 +50,12 @@ public class ActivityLifeManager implements Application.ActivityLifecycleCallbac
|
||||
@Override
|
||||
public void onActivityResumed(Activity activity) {
|
||||
ActivityStackManager.getInstance().setTopUpgradeActivity(activity);
|
||||
Adjust.onResume();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onActivityPaused(Activity activity) {
|
||||
|
||||
Adjust.onPause();
|
||||
}
|
||||
|
||||
|
||||
|
@@ -17,6 +17,9 @@ import android.util.Log;
|
||||
|
||||
import androidx.multidex.MultiDex;
|
||||
|
||||
import com.adjust.sdk.Adjust;
|
||||
import com.adjust.sdk.AdjustConfig;
|
||||
import com.adjust.sdk.LogLevel;
|
||||
import com.bumptech.glide.request.target.ViewTarget;
|
||||
import com.coorchice.library.utils.LogUtils;
|
||||
import com.google.firebase.analytics.FirebaseAnalytics;
|
||||
@@ -275,6 +278,13 @@ public class XChatApplication extends Application {
|
||||
UMConfigure.setEncryptEnabled(true);
|
||||
// 集成测试
|
||||
UMConfigure.setLogEnabled(BuildConfig.DEBUG);
|
||||
|
||||
//Adjust
|
||||
String appToken = XChatConstants.ADJUST_APP_TOKEN;
|
||||
String environment = AdjustConfig.ENVIRONMENT_SANDBOX;
|
||||
AdjustConfig config = new AdjustConfig(instance, appToken, environment);
|
||||
config.setLogLevel(LogLevel.VERBOSE);
|
||||
Adjust.onCreate(config);
|
||||
}
|
||||
|
||||
LogUtils.d("init time = " + (System.currentTimeMillis() - startTime) + "ms");
|
||||
|
@@ -18,7 +18,7 @@ buildscript {
|
||||
}
|
||||
|
||||
dependencies {
|
||||
classpath 'com.android.tools.build:gradle:7.3.0'
|
||||
classpath 'com.android.tools.build:gradle:7.3.1'
|
||||
//realm 数据库插件
|
||||
classpath "io.realm:realm-gradle-plugin:5.3.0"
|
||||
// android 资源混淆插件
|
||||
|
@@ -1,7 +1,7 @@
|
||||
package com.yizhuan.xchat_android_constants;
|
||||
|
||||
import com.yizhuan.xchat_android_core.R;
|
||||
import com.yizhuan.xchat_android_core.BuildConfig;
|
||||
import com.yizhuan.xchat_android_core.R;
|
||||
import com.yizhuan.xchat_android_library.utils.ResUtil;
|
||||
|
||||
/**
|
||||
@@ -272,4 +272,10 @@ public class XChatConstants {
|
||||
(byte) 0x2e, (byte) 0x95, (byte) 0xb1, (byte) 0xe3, (byte) 0x48, (byte) 0x7f, (byte) 0x86, (byte) 0x01, (byte) 0x78,
|
||||
(byte) 0xf1, (byte) 0xe0, (byte) 0x0c, (byte) 0x7a, (byte) 0xca
|
||||
};
|
||||
|
||||
/**
|
||||
* Adjust配置
|
||||
*/
|
||||
public static final String ADJUST_APP_TOKEN = "p5sndfu9udq8";
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user