I am trying to incorporate Google's in-app-billing API3 in my code that has been using API2.
My call to mHelper (the IabHelper object) succeeds, so I am connecting to Google's servers. It appears that I can determine owned items, as my QueryInventoryFinishedListener returns a valid Inventory with all my purchased items. I am also able to execute a purchase.
However, querying for sku details fails (getSkuDetails()). Here is all IabHelper-related LogCat output from Eclipse (I removed my package name and product SKUs) leading up to the failure:
12-31 11:47:04.642: D/IabHelper(13633): Starting in-app billing setup.
12-31 11:47:04.832: D/IabHelper(13633): Billing service connected.
12-31 11:47:04.832: D/IabHelper(13633): Checking for in-app billing 3 support.
12-31 11:47:04.832: D/IabHelper(13633): In-app billing version 3 supported for com.XXXX.XXXX
12-31 11:47:04.832: D/IabHelper(13633): Subscriptions AVAILABLE.
12-31 11:47:04.842: D/IabHelper(13633): Starting async operation: refresh inventory
12-31 11:47:04.842: D/IabHelper(13633): Querying owned items, item type: inapp
12-31 11:47:04.842: D/IabHelper(13633): Package name: com.XXXX.XXXX
12-31 11:47:04.842: D/IabHelper(13633): Calling getPurchases with continuation token: null
12-31 11:47:04.912: D/IabHelper(13633): Owned items response: 0
12-31 11:47:04.912: D/IabHelper(13633): Sku is owned: com.XXXX.XXXX.item_one
12-31 11:47:04.922: D/IabHelper(13633): Sku is owned: com.XXXX.XXXX.item_two
...
(and 45 other items)
...
12-31 11:47:05.012: D/IabHelper(13633): Continuation token: null
12-31 11:47:05.012: D/IabHelper(13633): Querying SKU details.
12-31 11:47:05.012: D/IabHelper(13633): getSkuDetails() failed: 5:Developer Error
12-31 11:47:05.012: D/IabHelper(13633): Ending async operation: refresh inventory
It doesn't seem like a signing issue, since I can successfully connect and make a purchase.
Has anybody else been having issues where getSkuDetails() fails with the "Developer Error" message, while other aspects of in-app-billing work?
Thanks for your time!
Best Answer
I've experienced the same problem. The issue appears to occur when you've more than 20 SKUs in your inventory.
The solution was to get the SKU details in chunks. Replace
querySkuDetails
inIabHelper.java
with:This method gets the SKUs in chunks of 18. It worked for me.