I'm using the Google Play Billing Library and I read the documentation and all questions about validating the purchases on the server and how to inquiry the purchases.
However, some points are still not clear and I couldn't find answers to them here.
To retrieve purchases the next time the user launches the app, the documentation says we should use BillingClient.queryPurchases()
and it says about the list obtained from this method:
As long as the in-app product is on this list, the user should have access to it.
What I understand from this is that queryPurchases() alone guarantees that the user really bought the item and he must get access to it.
Is this True?
- If Yes, then why we don't just use this method right after the user makes a purchase as a validation instead of validating it on the server?
- If No, how can I provide access for the user if I don't want to validate his purchase on my server each time he launches the app?
- If I saved the purchase on a local database after the first validation and inquired it when the app launches to grant user access to his items, is this a secure approach or this database can be manipulated from a malicious user to grant himself access to the premium content?