Android In-app Billing, multiple purchases of the same item

笑着哭i 提交于 2019-12-10 17:17:58

问题


Is there a way to buy a multiple of an item (SKU)?

For example: I have an SKU named LifePoint, and i want to buy 100 LifePoint.

(in another word N * my_item).

I found this workaround, but am looking for something better.

PS: I'am using In-app Billing Version 3 and my item is Unmanaged (to buy my product many times).

Thanks in advance!


回答1:


I'm pretty sure that it's been made deliberately impossible to do that to prevent apps from stealing large amounts of money from the user. Each purchase requires confirmation using the Google in-app billing popup which stops that kind of thing happening.

The way I've done something similar is to set up different SKU's (as in the answer you linked to) but to use the SKU 'title' field to decide how many items to award the player. If you do it that way you can easily change those values in the Google Play console without having to update your app.



来源:https://stackoverflow.com/questions/27060427/android-in-app-billing-multiple-purchases-of-the-same-item

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!