Last updated:
0 purchases
flutter check adjust cloak
flutter_check_adjust_cloak #
A new Flutter project.
Get started #
Set Proguard #
0.2.4 0.2.5 0.2.6-> c37
Create proguard-rules.pro file into your android->app, add content in this file
-keep public 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.**{ *; }
copied to clipboard
If your publishing target is not a Google Play store, please add the following rules to the Proguard file:
-keep public class com.adjust.sdk.**{ *; }
-keep public class com.android.installreferrer.**{ *; }
copied to clipboard
Quote proguard-rules.pro into your app->build.gradle
buildTypes {
release {
signingConfig signingConfigs.release
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
copied to clipboard
Set up session tracking #
Default support for session tracking on iOS devices, To set up session tracking for Android devices, you can globally set it on the homepage or set it according to each widget
import 'package:adjust_sdk/adjust.dart';
class MainScreen extends StatefulWidget {
@override
State createState() => new MainScreenState();
}
class MainScreenState extends State<mainscreen> with WidgetsBindingObserver {
@override
initState() {
super.initState();
WidgetsBinding.instance.addObserver(this);
}
@override
void dispose() {
WidgetsBinding.instance.removeObserver(this);
super.dispose();
}
@override
void didChangeAppLifecycleState(AppLifecycleState state) {
switch (state) {
case AppLifecycleState.inactive:
break;
case AppLifecycleState.resumed:
Adjust.onResume();
break;
case AppLifecycleState.paused:
Adjust.onPause();
break;
default:
break;
}
}
}
copied to clipboard
Configure firebase data #
Android
1.copy google-services.json in your project->android->app
2.in your app->build.gradle, add apply plugin: 'com.google.gms.google-services'
example
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply plugin: 'com.google.gms.google-services'
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
copied to clipboard
3.in your project->build.gradle->buildscript->dependencies ,add classpath 'com.google.gms:google-services:4.3.15'
example
dependencies {
classpath 'com.android.tools.build:gradle:7.3.0'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath 'com.google.gms:google-services:4.3.15'
}
copied to clipboard
iOS
use xCode open ios project,right click Runner,choose Add files to "Runner", and choose your GoogleService-Info.plist
Examples #
1.Init
FlutterCheckAdjustCloak.instance.initCheck(
cloakPath: path,
normalModeStr: "",
blackModeStr: "",
adjustToken: "",
distinctId: distinctId,
unknownFirebaseKey: "",
referrerConfKey: "",
adjustListener: this
);
copied to clipboard
2.Check type, callback true means buy user ,false means not
FlutterCheckAdjustCloak.instance.checkType();
copied to clipboard
3.Force buy user,just debug mode effective
FlutterCheckAdjustCloak.instance.forceBuyUser(true);
copied to clipboard
4.if you want test firebase
FlutterCheckAdjustCloak.instance.setTestFirebase(true);
copied to clipboard
For personal and professional use. You cannot resell or redistribute these repositories in their original state.
There are no reviews.