In app billing v3 Android non-consumable items

前端 未结 2 632
小蘑菇
小蘑菇 2020-12-16 05:43

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-cons

相关标签:
2条回答
  • 2020-12-16 06:10

    Refering the developer site for the same, would be also helpful. http://developer.android.com/google/play/billing/api.html

    0 讨论(0)
  • 2020-12-16 06:16

    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.

    0 讨论(0)
提交回复
热议问题