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!
Your device is probably not whitelisted. As mentioned here, test devices should be whitelisted via AppsFlyer's app My Device ID by AppsFlyer
.