简体   繁体   English

兑换Android中的应用内购买代码

[英]Redeem code for in app purchases in Android

I have been searching how to generate redeem code for in app purchase in Android but no luck. 我一直在搜索如何为Android中的应用购买生成兑换代码,但是没有运气。 I guess there is nothing like that. 我猜没有那样的东西。 I developed an android app and I sell an item in the app. 我开发了一个android应用,并在该应用中出售了一件商品。 I want to give a code some users to buy the item with that code instead of paying. 我想提供一个代码,一些用户可以用该代码购买商品,而不是付款。 Is this possible ? 这可能吗 ? Even if there is another ways to do ? 即使还有另一种方法可以做? Thank you for replies. 感谢您的答复。

There is no built-in mechanism for what you want to achieve on Google Play; 您想要在Google Play上实现的功能没有内置的机制; you will have to build this yourself. 您将必须自己构建它。

You should treat the content you want to offer independently from any in-app purchases and offer an in-app purchase and code input to unlock the content. 您应该独立于任何应用程序内购买来对待要提供的内容,并提供应用程序内购买和代码输入以解锁内容。

Keep in mind you will not be able to benefit from restored purchases when a user has used a code to unlock the content. 请记住,当用户使用代码解锁内容后,您将无法从恢复的购买中受益。 So if the user clears the data on the app, their unlocked content will be gone unless you keep a server-side record of the content the user has unlocked. 因此,如果用户清除了应用程序上的数据,则除非您保留用户已解锁内容的服务器端记录,否则他们的未锁定内容将消失。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM