I'm starting with In App Billing and I would like to sell some magazines in my app. If one user buy one magazine he can read it always. I read about consumable and non-consumable in app billing but I didn't understand how can I make a non-consumable item and how can I manage it. I have to create a consumable item in google developer console and than specify in my app with a variable that the item is non-consumable? Thank you in advance
-
Refering the developer site for the same, would be also helpful. http://developer.android.com/google/play/billing/api.html – Sudhin Philip Mar 19 '14 at 13:58
1 Answers
First, The In-app Billing Version 3 service only supports managed in-app products so make sure that you specify that the purchase type is 'Managed' when you add new items to your product list in the Developer Console.
In In-app Billing Version 3 API once an item is purchased, it is considered to be "owned" and cannot be purchased again from Google Play. So I think we can say that per default items are non-consumable.
If you want to make this item consumable you have to call the consume function just after the purchase. Calling the consume function will "free" your item and make it "available" again. (Your user will be able to purchase it as many time as he wants)
mHelper.consumeAsync(purchase, mConsumeFinishedListener);
If you don't call the consume function, your item will never be consumed and will act like a non-consumable item.
-
Thank you very much, I hadn't completely understand "owned" and the consume part. – Tenaciousd93 Jul 25 '13 at 12:40
-
@p-mercier What about testing non-consumable prodcuts ? In document it says " Non-consumables should be tested the same as consumables, but you should verify an item cannot be purchased again within your app. " I test the in-app product it works but after 5 minutes it refunds and tester needs to re-purchase the item. – Abdulsamet Kılınçarslan Feb 11 '21 at 16:39