Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

In app billing v3 Android non-consumable items

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

like image 749
Tenaciousd93 Avatar asked Jul 23 '13 07:07

Tenaciousd93


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.

like image 123
p-mercier Avatar answered Oct 06 '22 01:10

p-mercier