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

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

  •  05-10-2022
  •  | 
  •  

문제

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?

도움이 되었습니까?

해결책

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.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top