Store record of purchased items locally vs query google play for purchased items [ queryInventoryAsync(QueryInventoryFinishedListener)]

StackOverflow https://stackoverflow.com/questions/21484989

  •  05-10-2022
  •  | 
  •  

Question

I am using IAB for my application.

Google's IAB v3 API provides a method to query Google Play for managed items already owned by the user(device) v.i.z. queryInventoryAsync(QueryInventoryFinishedListener)

However, I also use a SQLite database for my app , so I am thinking of storing the record of purchased items in my own database instead of querying google play every second time.

Is this a bad idea?

What are the pros and cons of queryInventoryAsync vs storing purchased items in local SQLite database?

Was it helpful?

Solution

User can manually clear application data and your database will be dropped. Or user can run the application on another device with same account.

Purchasing In-app Billing Products

It is good practice to frequently query the In-app Billing service for the user’s purchases, for example whenever the app starts up or resumes, so that the user’s current in-app product ownership information is always reflected in your app.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top