Question

I have an application and I am trying to understand in-app billing. I want to do this : If a user buys an item with in-app billing. user can use this item with same account in different device without paying again. So my scenerio is this:

Assume that I have a application and it has in-app billing V3 service. And then a user purchases an "Managed Product" item and the user has an another device then the user wants to install this purcashed item in other device without paying again. But I read here, people talk about this problem:

BILLING_RESPONSE_RESULT_ITEM_ALREADY_OWNED

At this point I am thinking to consume this product as soon as it is purchased. with this code:

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

if it right way. what will the user see after clicking buy button in another device.(is it possible free purchase)

Also I am not sure what will happen, if the user uninstall and install again my app. what will user see if click a buy button. (purchase again or free purchase or a ERROR)

Can you give advice about in app-billing service for 1 account and many device and also about what will see a user if try to purchase in another device even everything goes right.

Était-ce utile?

La solution

From here http://developer.android.com/google/play/billing/api.html :

Managed In-app Products

Managed in-app products are items that have their ownership information tracked and managed by Google Play. When a user purchases a managed in-app item, Google Play stores the purchase information for each item on a per-user basis. This enables you to later query Google Play at any time to restore the state of the items a specific user has purchased. This information is persistent on the Google Play servers even if the user uninstalls the application or if they change devices.

What you want to do is ( like in the example app ) query the inventory on successful setup of your in app service and consume any managed item thus granting access to it.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top