fredlala8 / marketbilling

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

Patch for querying more than 20 items #123

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
It looks like the version of IabHelper.java distributed with ADT 22 has a 
problem when querying SKU details as it does not check the number of skus.
If this number is over 20, the billing service returns a developer error (5). 
Splitting up the request in sets of no more than 20 items avoids it.

I'm posting a patch for this issue that has been quickly hacked together. I 
hope you guys can either include it in the next release or even better make a 
more elegant one.

Thanks!

Original issue reported on code.google.com by santine...@altralogica.it on 30 May 2013 at 10:26

Attachments:

GoogleCodeExporter commented 8 years ago
Hello,
Thanks for your contribution. Before reviewing your patch, you'll need to sign 
a contributor license agreement (CLA). You can find an electronic version here:

Individual contributions: 
https://developers.google.com/open-source/cla/individual
Corporate contributions: https://developers.google.com/open-source/cla/corporate

Once you've completed the CLA, let me know and I can begin reviewing your 
patch. Cheers!

Original comment by trevorjohns@google.com on 30 May 2013 at 5:45

GoogleCodeExporter commented 8 years ago

Original comment by trevorjohns@google.com on 30 May 2013 at 5:52

GoogleCodeExporter commented 8 years ago
Hello,

I've submitted the electronically signed form for individuals a few minutes
ago.
Thanks!

Valerio Santinelli

ALTRALOGICA s.r.l.
Via Tasso,10 - 24020 Gorle (BG)
Tel: +39 035.656098
Fax: +39 035.656098
Web: http://www.altralogica.it

ALTRALOGICA s.r.l. - Questo messaggio è rivolto unicamente al destinatario
indicato e potrebbe contenere informazioni riservate o confidenziali. Se lo
ha ricevuto per errore, ci scusiamo per l'inconveniente. Lo segnali
cortesemente al mittente e distrugga subito l'originale. Ogni altro
utilizzo
sarà considerato illegale. ALTRALOGICA s.r.l. non si assume alcuna
responsabilità per usi impropri di questo messaggio o di sue parti.

ALTRALOGICA s.r.l. - This message is for the designated recipient only and
may contain privileged or confidential information. If you have received it
by error, we apologize. Please notify the sender immediately and delete the
original. Any other use of the message is illegal. ALTRALOGICA s.r.l. does
not accept any liability for corruption, interception or damages, if any,
caused by unauthorized use of this message or parts

Original comment by santine...@altralogica.it on 31 May 2013 at 9:19

GoogleCodeExporter commented 8 years ago
I just wasted a couple of days because this issue.

"If this number is over 20, the billing service returns a developer error (5). 
Splitting up the request in sets of no more than 20 items avoids it."

Also, I had 15 items, but owned more than 5 of them, and the logic just adds 
the all items list, and the owned items list, so I went over 20 :(

Original comment by tamas.be...@redact-media.com on 5 Aug 2013 at 9:36

GoogleCodeExporter commented 8 years ago
Hello,
Thank you for your patch, it helps me solve problem with querying items. In my 
game 15 in-app purchases total - 9 of them consumable other 6 not.
When I buy 6 non-consumable items, iabhelper receives items list and then 
throws error. After patching iabhelper it works fine.

Original comment by and...@ugolnik.info on 13 Aug 2013 at 11:33

GoogleCodeExporter commented 8 years ago
Why this patch has not yet been applied to master?

Original comment by alessand...@gmail.com on 27 Nov 2013 at 6:53

GoogleCodeExporter commented 8 years ago
https://code.google.com/p/marketbilling/source/detail?r=e021963b9c2592b38e5718ac
a96a8a7c648fc386

commit e021963b9c2592b38e5718aca96a8a7c648fc386
Author: Valerio Santinelli <santinelli@altralogica.it>
Date:   Thu Dec 12 16:03:17 2013 -0800

    Support for querying more than 20 SKUs at a time

    Updates querySkuDetails() such that requests are batched up, with no
    more than 20 SKUs per batch.

    Issue: 123
    Signed-off-by: Trevor Johns <trevorjohns@google.com>

Original comment by trevorjohns@google.com on 13 Dec 2013 at 12:07

GoogleCodeExporter commented 8 years ago
Now IabHelper.java can't be compiled. Scope isn't closed.

Original comment by and...@ugolnik.info on 13 Dec 2013 at 9:22

GoogleCodeExporter commented 8 years ago
And skuDetails isn't defined.

Original comment by and...@ugolnik.info on 13 Dec 2013 at 9:39

GoogleCodeExporter commented 8 years ago
From a quick look at how it's been merged, it looks like my contribution has 
been merged against a different version of that same file and without taking 
into consideration the whole patch. 
Anyway, what can you expect after 7 months have passed since the patch has been 
sent? I wonder if there's any QA at the Android team. It's not the first time 
something gets released in a broken state.

@trevorjohns can you please redo the merge and check that the logic doesn't get 
mixed up? Thanks!

Original comment by santine...@altralogica.it on 13 Dec 2013 at 9:44

GoogleCodeExporter commented 8 years ago
santinelli: Thanks for checking, I was cleaning out old to-dos late last night 
and didn't have a chance to properly test it yet.

To be fair, this hasn't been "released". The release version is distributed 
through the Android SDK manager as a download. The code in Git is for 
development, and may be unstable/broken.

I'll be spending some time cleaning things up today, at which point any build 
errors should get resolved.

And to answer your question: No, there is no QA team for this, because this is 
just sample code.

Original comment by trevorjohns@google.com on 13 Dec 2013 at 6:53

GoogleCodeExporter commented 8 years ago
Build issues have been fixed, and I've verified that the sample app is running 
again.

If any more problems are found, please open a new issue. Cheers!

commit ff1c062b22b97c3baee12eae8d65a2adcf396f5f
Author: Trevor Johns <trevorjohns@google.com>
Date:   Fri Dec 13 18:49:24 2013 -0800

    Fix built errors in IabHelper and BillingService

    - Clean up incomplete merge from patch
      e021963b9c2592b38e5718aca96a8a7c648fc386 in IabHelper.
    - Add missing return value in BillingService.

    Signed-off-by: Trevor Johns <trevorjohns@google.com>

Original comment by trevorjohns@google.com on 14 Dec 2013 at 2:51

GoogleCodeExporter commented 8 years ago
@trevorjohns thanks for the vlarification and for fixing the issue.
Cheers,

Valerio

Original comment by santine...@gmail.com on 14 Dec 2013 at 10:01

GoogleCodeExporter commented 8 years ago
Thanks Valerio for this Patch. 

Original comment by bak...@gmail.com on 23 Dec 2013 at 8:25

GoogleCodeExporter commented 8 years ago
Envíe el formulario. Sale codigo de error IAB-DPTL en el juego Minion Rush

Original comment by avilamar...@gmail.com on 6 Jan 2014 at 7:37

GoogleCodeExporter commented 8 years ago
There is an error, that querySkuDetails won't query anything if skuList.size % 
20 == 0.
Suggested fix attached.

Original comment by luteni...@gmail.com on 23 Jan 2014 at 8:52

Attachments:

GoogleCodeExporter commented 8 years ago
lutenidze: Thanks for your contribution. Before reviewing your patch, you'll 
need to sign a contributor license agreement (CLA). You can find an electronic 
version here:

Individual contributions: 
https://developers.google.com/open-source/cla/individual
Corporate contributions: https://developers.google.com/open-source/cla/corporate

Once you've completed the CLA, let me know and I can begin reviewing your 
patch. Cheers!

Original comment by trevorjohns@google.com on 23 Jan 2014 at 10:18

GoogleCodeExporter commented 8 years ago
I can confirm that when Trevor merged the patch, it didn't merge as it should 
have been.

Here's the current (revision ff1c062b22b9) function of IABHelper.java that has 
the wrong ending curly braces: https://gist.github.com/tanis2000/8824460

While this one is the same function in my code, which is the correct one: 
https://gist.github.com/tanis2000/8824514

You will notice that the only real different is a misplaced ending curly brace. 
You can just copy & paste this function over the one in the repository and 
you're going to be fine. 

@Trevor can you do that in the current repo, please?

You can find this change in my cloned and patched repo here: 
https://code.google.com/r/santinelli-marketbilling/source/detail?r=de268f08c4e4d
887c3fb0ac24c00e34ad99c8bda

Valerio

Original comment by santine...@gmail.com on 5 Feb 2014 at 2:29

GoogleCodeExporter commented 8 years ago
@Trevor , To be clear - my suggested patch is fixing the wrong merge of the 
@Valerio patch.
"Only real different - is misplaced ending curly brace".

Original comment by luteni...@gmail.com on 6 Feb 2014 at 6:07

GoogleCodeExporter commented 8 years ago
Hi, I am new in in app purchase. Any one tell me the solution for multiple 
education books apps purchase at single time.

Original comment by karthike...@gmail.com on 2 Apr 2014 at 2:31

GoogleCodeExporter commented 8 years ago
Thanks for pointing out the merge issue. It's been fixed.

Original comment by trevorjohns@google.com on 6 Aug 2014 at 8:43

GoogleCodeExporter commented 8 years ago

Original comment by trevorjohns@google.com on 6 Aug 2014 at 8:44