I'm experiencing an intermittent problem with In App Billing Version 3 using IABHelper as provided by Google.
Before Launching a new purchase I check for unconsumed purchases with queryInventoryAsync. If found I consume any unconsumed purchases and begin a new transaction, if not go directly to start a new transaction. 99% of the time it works fine.
Occasionally when queryInventoryAsync returns no unconsumed purchases, the following launchPurchaseFlow fails with Response : 7: Item already owned.
INFO [IABHelper] Starting async operation: refresh inventory
INFO [IABHelper] Querying owned items, item type: inapp
INFO [IABHelper] Package name: jp.co.mycompany.myapp
INFO [IABHelper] Calling getPurchases with continuation token: null
INFO [IABHelper] Owned items response: 0
INFO [IABHelper] Continuation token: null
INFO [IABHelper] Querying SKU details.
INFO [IABHelper] queryPrices: nothing to do because there are no SKUs.
INFO [IABHelper] Querying owned items, item type: subs
INFO [IABHelper] Package name: jp.co.mycompany.myapp
INFO [IABHelper] Calling getPurchases with continuation token: null
INFO [IABHelper] Owned items response: 0
INFO [IABHelper] Continuation token: null
INFO [IABHelper] Querying SKU details.
INFO [IABHelper] queryPrices: nothing to do because there are no SKUs.
INFO [IABHelper] Ending async operation: refresh inventory
INFO [IABHelper] Constructing buy intent for jp.co.mycompany.myapp.myitem, item type: inapp
INFO [IABHelper] Launching buy intent for jp.co.mycompany.myapp.myitem Request code: 1001
INFO [IABHelper] Ending async operation: launchPurchaseFlow
INFO [IABHelper] Purchase canceled - Response: 7:Item Already Owned
queryInventoryAsync is saying the user does not own the item, but launchPurchaseFlow says the user does.
Strangely after a wait (sometimes a few minutes, sometimes more) the problem resolves itself.
Has anyone experienced anything similar?
For reference I'm using the version of IABHelper last updated on March 15.
Do clear cache of Google Play Service app in mobile. It may work for you.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With