Closed wsrdzg closed 9 years ago
The same for me for Android 2.3.6 (gdx-pay 0.3.0)
I use 0.4.0-SNAPSHOT because 0.3.0 has some other bugs.
Looks like there is others with the same problem (OpenIAB backend): http://stackoverflow.com/questions/17154020/error-refreshing-iventory-querying-prices-of-items-response-6error
Basically each time we start the purchase manager, we query all the purchases and obtain an inventory list. Given Stackoverflow above, obtaining the inventory will fail if there is no internet connection available. Do you have internet (e.g. WiFi) on the two devices where it failed? Does the error still occur if you are connected to the internet?
And yes, please use 0.4.0-SNAPSHOT!
I had this problem in another project, while using plain IabHelper from Google. I can confirm that a lot of crashes was caused by querying inventory at the start of the app. It can, however succeed on the second attempt. So, we had decided to do not query inventory at the start but only if the user opens the shop screen, because most of the time you need inventory only for prices. We still query for purchases at the start. This reduced number of crashes. It's anyway a good idea to check IabResult.isSuccess in PurchaseManagerAndroidOpenIAB:351 before using inventory, I think!
While using gdx-pay 0.3.0 I had another error however, but it was fixed I hope. Sorry.
Good point! It definitely makes sense to load the inventory again if it fails the first time around.
I put it onto my to do list. I don't have time right now, but I'll fix it later :)
gdx-pay works fine on my Nexus 5 (5.0.2) and Nexus 7 2012 (5.0.1) but on my Galaxy S1 (2.3.3) I get the following exception when the app starts.