info |
Note By default, SDK tracks certain device identifiers like GAID, Android-id, activity names, etc. If required you can choose to opt-out of this tracking by using the |
Use the configureTrackingOptOut()
to pass on the configuration to the SDK.
val trackingOptOut = mutableSetOf<Class<*>>()
trackingOptOut.add(SplashActivity::class.java)
val trackingOptOutConfig = TrackingOptOutConfig(
isGaidTrackingEnabled = true,
isAndroidIdTrackingEnabled = true,
isCarrierTrackingEnabled = true,
isDeviceAttributeTrackingEnabled = true,
trackingOptOut)
val moengage = MoEngage.Builder(application, appId)
.configureTrackingOptOut(trackingOptOutConfig)
.build()
MoEngage.initialise(moengage)
Set<Class<?>> trackingOptOut = new HashSet<>();
trackingOptOut.add(SplashActivity.class);
MoEngage moEngage = new Builder(application, ConstantsKt.APP_ID)
.configureFcm(new FcmConfig(true))
.configureTrackingOptOut(new TrackingOptOutConfig(true, true, true, true, trackingOptOut))
.build();
MoEngage.initialise(moEngage);
For SDK version below 11.x.xx
If you are using the SDK version below 11.x.xx use the below APIs for opt-outs in the MoEngage.Builder
//Opt-out GAID tracking
optOutGAIDCollection()
//Opt-out Android Id tracking
optOutAndroidIdCollection()
//Opt-out Carrier name tracking
optOutAndroidIdCollection()
//Opt-out device attribute tracking
optOutDeviceAttributeCollection()