RandeeCao / marketbilling

Automatically exported from code.google.com/p/marketbilling
1 stars 0 forks source link

Patch for /v3/src/com/example/android/trivialdrivesample/util/IabHelper.java #101

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
In querySkuDetails(). changed the arraylist to a set. This prevents duplicate 
skus   in the skuList. I had some strange results when I had the same SKU's in 
"AllOwnedSkus" and "moreSkus". This approach fixes this: skuList can no longer 
contain any duplicate skus.

Original issue reported on code.google.com by j...@ploosh.net on 6 Feb 2013 at 7:51

Attachments:

GoogleCodeExporter commented 8 years ago
We also had a problem with a list of "moreSkus" of about 10 in-app items.

While adding more in-app items, this exception was throwed at some point: 
"Error refreshing inventory (querying prices of items)", with the error 
"5:Developer Error" coming from querySkuDetails().

We also had in the "moreSkus" list some duplicate items with already owned skus 
list.

With this patch, our problem is fixed for now.

Original comment by spij...@gmail.com on 26 Feb 2013 at 12:59

GoogleCodeExporter commented 8 years ago
Nice to see it works for you. Hope this will make it into the next official 
release.

Original comment by j...@ploosh.net on 26 Feb 2013 at 6:41

GoogleCodeExporter commented 8 years ago

Original comment by b...@google.com on 1 Mar 2013 at 9:28

GoogleCodeExporter commented 8 years ago
A fix for this issue was included in the latest push. Please update to the 
latest version of the source and try again!

Original comment by b...@google.com on 16 Mar 2013 at 12:52

GoogleCodeExporter commented 8 years ago
I am experiencing the same error: IABResult message: "Error refreshing 
inventory (querying prices of items). (response: 5:Developer Error)", but I'm 
not clear whether this fix will help, or how to implement it.

I am currently using the latest Google Play Billing Library (Rev. 4 in the 
Eclipse Android SDK Manager), but the signature of the querySkuDetails() method 
doesn't quite match the code posted here (?)..

Can someone please let me know how/where to get the latest complete version of 
the IABHelper and associated classes?  Thank you!

Original comment by bill7.st...@gmail.com on 2 May 2013 at 3:26

GoogleCodeExporter commented 8 years ago
I tried the patch, but it did not work for me.  The code was previously 
working, but now I'm getting this error.  What else could be causing it?

Original comment by bill7.st...@gmail.com on 2 May 2013 at 5:48

GoogleCodeExporter commented 8 years ago
I'm experiencing the same issue. I applied the patch but it doesn't fix the 
problem for me. I do not have duplicate skus in my list. They're just quite 
some (25 in-apps).

Original comment by santine...@altralogica.it on 30 May 2013 at 8:35

GoogleCodeExporter commented 8 years ago
I think I found the reason. If I query more than 20 skus at the same time, 
there comes the error. The solution is to query no more than 20 skus per call.
It'd be nice if you could patch querySkuDetails to automatically split the 
list. Thanks!

Original comment by santine...@altralogica.it on 30 May 2013 at 9:01

GoogleCodeExporter commented 8 years ago
Here's a quick patch I put together based on the version of IabHelper 
distributed with ADT 22.
It's a bit hacked together but it does the job FWIW.

Original comment by santine...@altralogica.it on 30 May 2013 at 10:23

Attachments: