Android 应用内多次购买
有没有办法使用应用内购买购买超过 1 件商品? 例如 - 我可以购买 2 件相同的商品吗?
Is there a way to do more than 1 item using in-app purchase?
For example - can I buy 2 of the same item?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
创建多个产品不是正确的答案。因为如果你计划出售游戏内的金钱或“健康药水”。这些东西可以无限次购买。
请参阅有关托管/非托管产品的答案进行更正处理这种情况。
Creation multiple Products is not correct answer. Because if you planing sell in-game money or "health potions". These things can be purchased an infinite number of times.
See the answer about managed/unmanaged products to correct processing this situation.
不,现在不行。您可以购买多个非托管项目,但它们需要单独购买。
作为一种解决方法,我看到人们为不同的商品数量创建单独的 SKU。例如:
或者,您可以允许用户购买特定于您的应用程序的应用程序内积分(同样,您需要创建代表不同信用值的不同 SKU),然后编写自己的店面以将这些信用值兑换成商品。这需要更多的工作,但这让您对结帐流程有更多的控制和灵活性。
No, not at this time. You can buy multiple unmanaged items, but they'll need to be separate purchases.
As a workaround, I've seen people create separate SKUs for different item quantities. For example:
Alternatively, you can allow users to buy in-app credits specific to your app (again, you'll need to create different SKUs representing different credit values), then write your own storefront for exchanging these credits for goods. It's a bit more work, but this gives you a lot more control and flexibility over the checkout flow.
可以
参考:
https://github.com/googlesamples/android-play-billing/blob/master/TrivialDrive/app/src/main/java/com/example/android/trivialdrivesample/MainActivity.java
基本上你必须使用该项目来通知 Google 有关此可能性的信息。
请参阅有关消费购买的文档
https://developer.android.com/training/in-app-billing/purchase-iab-products.html#Consume
It's possible
Reference:
https://github.com/googlesamples/android-play-billing/blob/master/TrivialDrive/app/src/main/java/com/example/android/trivialdrivesample/MainActivity.java
Basically you must cunsume the item to notify Google about this possibility.
See the documentation about Consume a purchase
https://developer.android.com/training/in-app-billing/purchase-iab-products.html#Consume