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

AppsFlyerConversionListener not triggered. #10

Open
raman-branavitski opened this issue Aug 6, 2020 · 7 comments
Open

AppsFlyerConversionListener not triggered. #10

raman-branavitski opened this issue Aug 6, 2020 · 7 comments

Comments

@raman-branavitski
Copy link

Hi, found an issue. According to documentation startTracking can be postponed until you receive user consent due to GDPR or CCPA requirements, etc.(https://support.appsflyer.com/hc/en-us/articles/207032126-Android-SDK-integration-for-developers#integration-34-delaying-initializing-the-sdk)

In case of startTracking will be called with Application context after MainActivity.onResume() AppsFlyerConversionListener wouldn't be called until activity's onResume() will be triggered again.

@sokoloff06
Copy link

Hey @raman-branavitski!

As mentioned in the doc you refer to, please make sure to pass Activity instance as a context argument and not Application.

@raman-branavitski
Copy link
Author

Yes, that's a problem. In documentation there isn't any information that I should pass Activity context. Otherwise conversationListener doesn't work.

@sokoloff06
Copy link

@raman-branavitski here is the section with the relevant instructions. Please let us know if anything is yet not clear
image

@raman-branavitski
Copy link
Author

raman-branavitski commented Aug 6, 2020

Ok, thanks. The problem is that I don't call startTracking() inside Activity class. We have AppsFlyerManager class which encapsulate all logic with Appsflyer integration. This class initialized inside Application class with it's context(Application context). Also AppsFlyerManager starts listen GDPR status(accepted or not) and when user accept GDPR it call startTracking with Application context(at this moment activity's onResume() is already passed).

@raman-branavitski
Copy link
Author

To summarize. I can call startTracking() with application context only right after init(). If startTracking() should be postponed I should call it with ONLY Activity context. Right?

@sokoloff06
Copy link

@raman-branavitski Thanks for elaborating, understand the challenge more clearly now. You are correct, to make sure late initialization is done properly, you should pass Activity class as the context argument.
The reason behind that is that our SDK needs to inspect Activity's intent to see if it contains any deep link data.
In fact, I get your point and will check internally if we can improve in this area or give you some other solution

@raman-branavitski
Copy link
Author

Thanks Vitaly

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

No branches or pull requests

2 participants