Herry
Herry

Reputation: 7087

Do i need to use Consume a Purchase if my app need only one time purchase item?

I am using Version 3 API for in App Purchase in my application. I am confuse about should i have to call

mHelper.consumeAsync(inventory.getPurchase(SKU_GAS), 
   mConsumeFinishedListener);

above method if my application need only one time Purchase of my in app product .

In demo example of In App purchase API 3 they are calling consumeAsync for following listener so why they are calling consumeAsync ?.

1.QueryInventoryFinishedListener when your Product id has purchased.

2.OnIabPurchaseFinishedListener when your product purchase successfully.

Please explain me when to use consumeAyncs method for In app purchase.

Upvotes: 5

Views: 1982

Answers (1)

Vitthalk
Vitthalk

Reputation: 354

In App purchase version 3 supports Managed product only. when application want to implement unmanaged product so that end user can buy same product again when require, Application needs to consume previously purchased product to make it available to purchase again. As per your application requirement, Your product type is Managed. it means that you need not to call consumeAsync at all. Because in this case, you can restore your product to end user device, if device does factory reset operation.

Upvotes: 10

Related Questions