Skip to content

Instantly share code, notes, and snippets.

@oxlb
Created February 20, 2020 08:42
Show Gist options
  • Save oxlb/9e00cfb39026431abf076237d7be4cde to your computer and use it in GitHub Desktop.
Save oxlb/9e00cfb39026431abf076237d7be4cde to your computer and use it in GitHub Desktop.
AppsFlyerLib.getInstance().registerConversionListener(this, new AppsFlyerConversionListener() {
/* for deferred deep linking */ @Override
public void onConversionDataSuccess(Map<String, String> conversionData) {
for (String attrName : conversionData.keySet()) {
Log.d(AppsFlyerLib.LOG_TAG, "conversion_attribute: " + attrName + " = " +
conversionData.get(attrName));
}
}
@Override
public void onConversionDataFail(String errorMessage) {
Log.d(AppsFlyerLib.LOG_TAG, "error onAttributionFailure : " + errorMessage);
}
/* for direct deep linking */
@Override
public void onAppOpenAttribution(Map<String, String> conversionData) {
for (String attrName : conversionData.keySet()) {
Log.d(AppsFlyerLib.LOG_TAG, "onAppOpen_attribute: " + attrName + " = " +
conversionData.get(attrName));
}
}
@Override
public void onAttributionFailure(String errorMessage) {
Log.d(AppsFlyerLib.LOG_TAG, "error onAttributionFailure : " + errorMessage);
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment