-
Notifications
You must be signed in to change notification settings - Fork 39
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
onPurchasedProductsFetched is always called twice #46
Comments
I had the same issue. If your device supports subscriptions, then the code sends first callback to In my case, I am only interested in INAPP purchases so I skipped all redundant callbacks by checking |
I've never had any problems restoring purchases with my app, but I'm only using |
It helps for sure. I still have some reports from users saying they "lose" their Pro purchase experience but I didn't check yet if it's a lib issue or my own implementation issue. I can say that it started happening since I switched to this lib and only when the user opens the app after it was in the background for a while (Don't keep activities doesn't reproduce the same conditions unfortunately). |
The Also, it's good to know that Google Billing API returns purchases details for currently owned items without a network request using the Google Play Store cache... that's why Google recommends to handle purchases and security on your server |
onPurchasedProductsFetched is called twice on connect().
One time with purchases empty and once with purchases as expected (in case the user purchased).
The worst thing is that there's a race condition so you can't even write a logic based on skipping the first time as sometimes this is the correct data, followed by the false data.
It doesn't help to connect before setting the listener or after.
The text was updated successfully, but these errors were encountered: