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

Connection should be closed after retrieving referrer information #38

Open
bilalq opened this issue Oct 2, 2023 · 1 comment
Open
Labels
enhancement New feature or request

Comments

@bilalq
Copy link

bilalq commented Oct 2, 2023

Is your feature request related to a problem? Please describe.
From Google's docs on the Play Install Referrer library:

Closing service connection
After getting referrer information, call the endConnection() method on your InstallReferrerClient instance to close the connection. Closing the connection will help you avoid leaks and performance problems.

For further information, refer to the Play Install Referrer Library Reference.

- Source: https://developer.android.com/google/play/installreferrer/library#closing-connection

Describe the solution you'd like
I'm not very familiar with the specifics of this API, but it seems like the endConnection call can be made in the success case for onInstallReferrerSetupFinished.

Describe alternatives you've considered
It's not terrible to leave as-is if you avoid running the native module outside of the first run based on local storage lookups, but since the docs specifically instruct doing this, it probably would be best to just close the connection.

Additional context
N/A

@bilalq bilalq added the enhancement New feature or request label Oct 2, 2023
@uerceg
Copy link
Owner

uerceg commented Oct 20, 2024

Hello @bilalq,

And sorry for quite a bit of delay in replying to this one.

Great catch and I believe that you are absolutely right - ending connection in OK case after getting a response sounds like a thing that should be done. 👍

I can add the change, but having in mind that you're the contributor to the idea itself - if you are willing to open a pull request to add that change, go for it, it would be my pleasure to merge it that way. In case you don't wanna bother with that, also good, I can add the change as well to the next update.

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

No branches or pull requests

2 participants