Minkoo
Minkoo

Reputation: 439

AppsFlyer integration enable/disable tracking in android not working as expected?

I have integrated AppsFlyer in my app. But not able to activate and deactivate tracking as per my requirement. Eg In facebook we use:
to activate:

AppEventsLogger.activateApp(this);

and to deactivate:

AppEventsLogger.deactivateApp(this);

In AppsFlyer tutorial, it is given how to enable or disable tracking:

 AppsFlyerLib.setDeviceTrackingDisabled(true);


 @Override
 public void onResume() {
 super.onResume();
 AppsFlyerLib.onActivityResume(this);
 }
 @Override
 public void onPause() {
 super.onPause();
 AppsFlyerLib.onActivityPause(this); 
 }

But in my code, its not taking this code.

 AppsFlyerLib.setDeviceTrackingDisabled

dependency using :

 compile 'com.appsflyer:af-android-sdk:4.3.8@aar'

Upvotes: 1

Views: 1982

Answers (1)

Maxim Shoustin
Maxim Shoustin

Reputation: 77930

Opt-out (aka COPPA) is available from 4.7.0 (you use 4.3.8). The latest Android version see HERE.

Once you set AppsFlyerLib.setDeviceTrackingDisabled(true); - the flag deviceTrackingDisabled:true will be sent to AppsFlyer and data will not be stored.

Upvotes: 1

Related Questions