Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

AppsFlyer SDK integration

I have added AppsFlyer SDK in application. Below is the code which i have added in the application:

In Application class:

 AppsFlyerConversionListener conversionDataListener =
                new AppsFlyerConversionListener() {

                    @Override
                    public void onInstallConversionDataLoaded(Map<String, String> conversionData) {

                    }

                    @Override
                    public void onInstallConversionFailure(String errorMessage) {
                        Log.d(AppsFlyerLib.LOG_TAG, "error getting conversion data: " + errorMessage);
                    }

                    @Override
                    public void onAppOpenAttribution(Map<String, String> attributionData) {
                        Log.d(AppsFlyerLib.LOG_TAG, "DEEP LINK WORKING");
                    }

                    @Override
                    public void onAttributionFailure(String errorMessage) {
                        Log.d(AppsFlyerLib.LOG_TAG, "error onAttributionFailure : " + errorMessage);
                    }
                };


AppsFlyerLib.getInstance().startTracking(this, "DEV_KEY");

In manifest :

<receiver android:name="com.appsflyer.SingleInstallBroadcastReceiver" android:exported="true">
      <intent-filter>
           <action android:name="com.android.vending.INSTALL_REFERRER" />
      </intent-filter>
</receiver>

In Activity for track event :

Map<String, Object> eventValue = new HashMap<String, Object>();
                    eventValue.put("login", "member");
AppsFlyerLib.getInstance().trackEvent(getApplicationContext(), "event_login", eventValue);

I am not able to view the event in AppsFlyer dashboard. Also not able to view custom parameters of event.

Any suggestions?

Thank you!

like image 759
Annie Avatar asked May 01 '26 07:05

Annie


1 Answers

Your device is probably not whitelisted. As mentioned here, test devices should be whitelisted via AppsFlyer's app My Device ID by AppsFlyer.

like image 79
zeroDivider Avatar answered May 02 '26 22:05

zeroDivider



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!