我应该做这之情况在应用内计费 [英] What should do for this Scenerio in-app billing

查看:253
本文介绍了我应该做这之情况在应用内计费的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个应用程序,我想了解在应用程序内结算。我想为做到这一点:如果用户购买在应用程序内结算的项目。用户可以使用此项目将用在不同的设备相同的帐户,而无需再次支付。所以,我之情况是这样的:

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:

假设我有一个应用程序,它在应用程序内结算V3的服务。然后,用户购买的管理产品项目,用户有其它设备,然后用户想安装其他的设备本purcashed项目的无需支付再次。但我读到这里,人们谈论这个问题:

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

BILLING_RESPONSE_RESULT_ITEM_ALREADY_OWNED

在这一点上,我想尽快,因为它是购买食用该产品。与此code:

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)

你可以在app帐单服务提供建议约1帐户和许多设备,也什么都会看到一个用户如果尝试购买,即使一切顺利另一台设备。

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.

推荐答案

从这里 http://developer.android.com/google/play/billing/api.html

管理应用内产品

管理应用内商品是具有其所有权的物品   信息跟踪和谷歌播放管理。当用户购买   一个托管在应用程序项目,谷歌播放商店购买信息   基于每个用户的基础上的每个项目。这使您可以稍后查询谷歌   玩随时恢复的一个特定用户拥有的物品的状态   购买。这个信息是持久的谷歌播放服务器   即使用户卸载应用程序,或者如果他们改变设备

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.

这篇关于我应该做这之情况在应用内计费的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆