Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ Android ] onInstallConversionData cannot be listen #111

Closed
tamago3keran opened this issue Sep 30, 2019 · 2 comments · Fixed by #112
Closed

[ Android ] onInstallConversionData cannot be listen #111

tamago3keran opened this issue Sep 30, 2019 · 2 comments · Fixed by #112

Comments

@tamago3keran
Copy link
Contributor

Report

The event is not listening to the onInstallConversionData on Android.
(I checked working onInstallConversionData on 1.4.4)

Plugin Version

1.4.5

On what Platform are you having the issue?

Android

What did you do?

appsFlyer.onInstallConversionData(appsFlyerMetadata => {
  console.log("onInstallConversionData is called");
});

What did you expect to happen?

On "Debug JS Remotely", printing words on Web Console.

What happened instead?

Nothing happens.

Please provide any other relevant information.

I changed code as the following, and onInstallConversionData became working.

android/src/main/java/com/appsflyer/reactnative/RNAppsFlyerModule.java

  private void handleSuccess(String eventType, Map<String, String> data) {
      JSONObject obj = new JSONObject();
  
      try {
          obj.put("status", afSuccess);
          obj.put("type", eventType);
          obj.put("data", new JSONObject(data));
          if (eventType.equals(afOnInstallConversionDataLoaded)) {
-             sendEvent(reactContext, afOnInstallConversionData, obj.toString());
+             sendEvent(reactContext, afOnInstallConversionDataLoaded, obj.toString());
          } else if (eventType.equals(afOnAppOpenAttribution)) {
              sendEvent(reactContext, afOnAppOpenAttribution, obj.toString());
          }
      } catch (JSONException e) {
          e.printStackTrace();
      }
  }

Maybe it needs to fix sendEvent's argument ( afOnInstallConversionData => afOnInstallConversionDataLoaded ) because it changed the code as the following at 1.4.5.

index.js

- const listener = NativeAppEventEmitter.addListener(
-   "onInstallConversionData",
+ const listener = appsFlyerEventEmitter.addListener(
+   "onInstallConversionDataLoaded",

v1.4.4...v1.4.5#diff-168726dbe96b3ce427e7fedce31bb0bcL161-R257

@pqkluan
Copy link

pqkluan commented Oct 2, 2019

I confirmed the onInstallConversionData listener is working after applying the above changes.

This bug is also affecting the deferred deep-link feature on the Android since it based on onInstallConversionData event.

@haveamission
Copy link
Contributor

I am still experiencing this bug in 5.0.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants