Reputation: 4036
When my app queries whether it has an in-app product using IabHelper, if there is no connectivity the response I get is:
Error refreshing inventory (querying prices of items). (response: 6:Error)
And that's fine. But when my app tries to purchase an already owned item (still with no connectivity), Google Play returns that the user already has the item in question.
So, since Google Play knows whether a user has an in-app product or not regardless of there being a connection present, how do I get this information without trying to purchase the in-app product? I would like my app to know if it has an in-app product even if there is no connectivity and querying inventory fails, and the only way I know to get this information now is to try to purchase the product.
Upvotes: 2
Views: 275
Reputation: 2674
First. Drop using iabhelper, it is for your own good. Second. Google Play Services caches information, so sometimes you get responses when device is offline. How and when this happens depends on current services implementation (which can and will change!). Make no assumptions and work with data as returned, offline or not.
Upvotes: 1