Optouts
Opt-out BackStack creation for Notification
You can optout back-stack creation for a notification by adding an opt out in the initialising object
MoEngage moEngage =
new MoEngage.Builder(this, "XXXXXXXXX")
.optOutBackStackBuilder()
.build();
MoEngage.initialise(moEngage);
Opt-out activity tracking
To opt-out from activity tracking add the list of activities in the initialising object.
ArrayList<Class> trackingOptOut = new ArrayList<>();
trackingOptOut.add(SettingsActivity.class);
MoEngage moEngage =
new MoEngage.Builder(this, "XXXXXXXXXXX")
.optOutActivityTracking(trackingOptOut)
.build();
MoEngage.initialise(moEngage);
Opt-out NavBar
If your app has Navigation Drawer and fragments please opt out of navigation bar modification while showing in-apps. To do so you need to add an opt-out in the initialiser object.
MoEngage moEngage =
new MoEngage.Builder(this, "XXXXXXXXXX")
.optOutNavBar()
.build();
MoEngage.initialise(moEngage);
Opt-out from Location Tracking and GeoFence
Geofence module can be excluded from the app's dependency list. Alter the dependency as shown below to exclude geofence module.
implementation ('com.moengage:moe-android-sdk:$sdkVersion') {
exclude group: 'com.moengage', module: 'moe-location-lib'
}
Opt-out Activity from showing InApp
If you want to suppress the In-APP in a particular activity for e.g., the Payment page or splash screen add the activity list in the initialiser object as shown below
ArrayList<Class> inAppOptOut = new ArrayList<>();
inAppOptOut.add(MainActivity.class);
MoEngage moEngage =
new MoEngage.Builder(this, "XXXXXXXXXX")
.optOutInAppOnActivity(inAppOptOut)
.build();
MoEngage.initialise(moEngage);
Opt-out of Google Advertising Identifier
By default MoEngage SDK tracks Google Advertising Identifier of the device. If you don't want this identifier to be tracked use the below opt-out.
MoEngage moEngage = new MoEngage.Builder(this, "XXXXXXXXXXXX")
.optOutGAIDCollection()
.build();
MoEngage.initialise(moEngage);
Updated over 5 years ago