We need the feature to Consume a purchase.
Thank you!
@medviktor - Can you just share with me what this means exactly so I can pass it along to the engineering team? I am a little naive with Google’s IAP.
Some examples of Consumable purchase types are:
• Supplies in a game (ammunition, health points, cheats, extra lives, etc)
• Accelerators used to decrease advancement time within an app
please refer the link https://developer.android.com/google/play/billing/api.html
This means that the user’s ownership of all in-app item purchases is maintained by Google Play, and your application can query the user’s purchase information when needed. When the user successfully purchases an in-app product, that purchase is recorded in Google Play. Once an in-app product is purchased, it is considered to be “owned”. In-app products in the “owned” state cannot be purchased from Google Play. You must send a consumption request for the “owned” in-app product before Google Play makes it available for purchase again. Consuming the in-app product reverts it to the “unowned” state, and discards the previous purchase data.
and the same for IOS https://developer.apple.com/in-app-purchase/In-App-Purchase-Guidelines.pdf
oh, ok, I do know this. Sorry. I thought “consume” a purchase meant something different in your original post. I know that we have consumable purchase support in iOS, I don’t know about Google Play. I will ask.
I talked to @nite and he said: “We support consumable on google play, but we don’t support non-consumable yet”
i do not see any method to consume a purchase in IAP class
static void init();
static void setDebug(bool debug);
static void purchase(const std::string& name);
static void refresh();
static void restore();
static void setListener(IAPListener* listener);
static void removeListener();
we need API to call this method http://developer.android.com/training/in-app-billing/purchase-iab-products.html#Consume
Thank you for this, let me ask @nite to help us with this.
Anything that purchased will be consumed automatically.
I’m understood, thank you
I need to implement a non-consumable items in the Google in-app billing.
(For example, item No-Ads)
Consumable item does not restore.
Is there a way that does not auto-consumption?
non-consumable support is coming next week.
pls, add this feature asap, we need it for our game
thanks in advance
hi @nite,
you said “Anything that purchased will be consumed automatically.”, can you clarify “Anything” more, because i already implemented the Google play iap before, it work fine, but now i’m using SDKBOX iap, i saw there are no consume at all,
p/s i’m using sdkbox iap 1.1.5
thanks
I am using the sdkbox iap 1.1.5 and found the following issue
The consume is automatically done after onSuccess. If sdkbox.setDebug(true), you will see such log. But there is another issue: If I try to purchase after received onSuccess() but before consume finished successfully(which may take 3 seconds sometimes), it will go wrong.
After that I can’t purchase and always show the message:
I/Native (15420): INF: SDKBoxIAP: refresh Products
I/Native (15420): ERR: SDKBoxIAP Can’t find any IAP listener.
I/Native (15420): INF: SDKBoxIAP: Processing a previous payment.
But the listener is ok because I could get onSuccess event.
From google’s IAP java code IabHelper.java with function name consumeAsyncInternal, you will find the call flagStartAsync(“consume”);
and void flagStartAsync(String operation)
if (mAsyncInProgress) throw new IllegalStateException(“Can’t start async operation (” +
operation + “) because another async operation(” + mAsyncOperation + “) is in progress.”);
I guess I should purchase again after Consume finished, The problem is I don’t know when the internal Consume finished.
That does sounds like a bug, we’ll look into it.
This bug should be fixed with the 1.2.0 release