Skip to content
This repository has been archived by the owner on Oct 19, 2020. It is now read-only.

Android more than 20 inapp purchases with a new iabhelper version #57

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

meldron
Copy link

@meldron meldron commented Aug 10, 2016

As is mentioned in the Readme.md getProducts on Android works only for up to 20 product ids, with this commits this issue is fixed.

Another unmentioned problem is, that after buying 20 products, restoreProducts is no longer working. This is also fixed.

As base of these fixes querySkuDetails of a newer version from OpenIAB has been used.

I think a complete update to the newer version of https://github.com/oorlov/OpenIAB should be done.

Bernd Kaiser added 2 commits August 10, 2016 12:37
…Purchase works after you did 20 or more purchases; Also no more limits for getProducts
@coveralls
Copy link

Coverage Status

Coverage increased (+0.7%) to 85.366% when pulling ee6bcc1 on meldron:new-iabhelper into 27262e5 on AlexDisler:master.

@meldron meldron changed the title New iabhelper Android more than 20 inapp purchases with a new iabhelper version Aug 15, 2016
NateEag pushed a commit to NxtbookMedia/cordova-plugin-inapppurchase that referenced this pull request Apr 5, 2019
The old implementation fails when there are more than twenty products
and the user owns some of them.

This is ripped shamelessly from this PR that upstream has never
accepted:

AlexDisler#57

Note that this undoes the conceptually-wrong change that *was* accepted
to deal with this problem:

AlexDisler#94
NateEag pushed a commit to NxtbookMedia/cordova-plugin-inapppurchase that referenced this pull request Apr 5, 2019
The old implementation fails when there are more than twenty products
and the user owns some of them.

This is ripped shamelessly from this PR that upstream has never
accepted:

AlexDisler#57

Note that this undoes the conceptually-wrong change that *was* accepted
to deal with this problem:

AlexDisler#94
NateEag pushed a commit to NxtbookMedia/cordova-plugin-inapppurchase that referenced this pull request Apr 5, 2019
The previous implementation fails when there are more than twenty
products and the user owns some of them.

This is just a copy of this PR that upstream has never accepted:

AlexDisler#57

Note that this undoes the conceptually-wrong change that *was* accepted
to deal with this problem (but doesn't):

AlexDisler#94

I've worked through this patch line-by-line and it seems like a
reasonable solution to me. Granted, it's been a few years since I wrote
Java, but conceptually it seems right - handle the Google API's demand
for chunking internally to the querySkuDetails() method, so nothing else
has to know about it.
@NateEag
Copy link

NateEag commented Apr 5, 2019

...huh, didn't occur to me that my commit-amending was going to show up on here. Sorry for the noise.

That said, can a maintainer explain to me why this was never merged?

As the comments in #94 show, the other approach doesn't actually constrain chunks to be less than twenty items, since it ignores what's actually happening in IabHelper.java.

This patch solves the problem I ran into and keeps things conceptually simpler.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants