2

Trying to integrate the AppsFlyer SDK for Android, I've followed all the steps indicated in the AppsFlyer guide. Initially, the dependency that was stated is:

implementation 'com.appsflyer:af-android-sdk:4+@aar'

But for some reason, it wasn't pointing to the latest version on it's own, making the init() version not visible. And so I instead went ahead and adjusted it to version 4.8.15 (currently the latest version), which worked as expected in the guide.

After adding the required permissions (with the optional permission) and the BroadcastReceiver (I don't have any other receivers for the referrer so I only used the SingleInstallBroadcastReceiver), I implemented the initialization on the app's Application class like so:

public class MyApp extends Application {

    private static final String AF_DEV_KEY = "DEV_KEY_FROM_CONSOLE_HERE";


    @Override
    public void onCreate() {
        super.onCreate()
        initAppsFlyer();
    }

    public void initAppsFlyer() {
        final AppsFlyerConversionListener listener = new AppsFlyerConversionListener() {
            @Override
            public void onInstallConversionDataLoaded(Map<String, String> conversionData) {

            }

            @Override
            public void onInstallConversionFailure(String errorMessage) {

            }

            @Override
            public void onAppOpenAttribution(Map<String, String> attributionData) {

            }

            @Override
            public void onAttributionFailure(String errorMessage) {

            }
        };
        AppsFlyerLib.getInstance().init(AF_DEV_KEY, listener, this);
        AppsFlyerLib.getInstance().startTracking(this);
    }
}

The manifest is pointing to the MyApp application class for sure. So that's it. The initial setup is complete. Time for the SDK Integration test as per the guide.

So I installed the app directly from Android Studio to my device, downloaded SDK Integration test app, whitelisted the device, and selected the name of the app as mentioned in the test guide. Every step followed accordingly.

Clicked on SDK Integration Testing...
Checking configuration...
Testing your app..
*app opens*
*closes*
*opens again*
Testing your app..
Checking configuration...
..
X Oops..

This app can not be monitored. Please make sure that:

  1. You are using a supported AppsFlyer SDK version.
  2. AppsFyler's BroadcastReceiver is configured.
  3. startTracking() is placed in the MainActivity
  1. It's the latest version. So it should work.
  2. Copy pasted the receiver. Tried removing it and then re-run the test, it showed the missing receiver error. Pasted it back in.
  3. I'm calling startTracking() in the actual application class. But what the heck. I gave it a try, called it in the MainActivity.onCreate() same result.

I have no idea what is causing the failure in the test. Not much to go on from as well since there's no details on how to debug it further. However, I checked the Dashboard, and there it is. Non-Organic install data counted.

Now I'm confused. Is there an issue with the integration or with the SDK integration test app?

AL.
  • 36,815
  • 10
  • 142
  • 281
  • 1
    As long as the dashboard counts and shows your non-organic install data, I would say you're good to go; and the issue is probably with the Integration test app. However, it might be best to get this assurance directly from AppsFlyer support (support@appsflyer.com), or wait for someone who currently works there to respond here. – shachar0n Sep 08 '18 at 09:55

0 Answers0