本文介绍了应用内结算的设计 - 如何给上先安装用户免费项目的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我要实现应用内结算我的应用程序,用户可以购买硬币。不过,我希望用户得到一些免费的硬币,当他们第一次尝试这个游戏。我如何去实现此?

I want to implement in-app billing for my application where users can purchase coins. However I want the users to get some free coins when they first try the game. How do I go about implementing this?

如果我只是把它存储在应用程序设置,他们可以只保留重新安装游戏,并再次得到免费的硬币。和SD卡是不够安全的,我不希望人们用它很容易被篡改。

If I just store it in the app settings, they can just keep re-installing the game and getting the free coins again. And the SD card is not secure enough, I don't want people tampering with it easily.

我希望这不是一个重复,但我环顾四周,找不到在文档任何东西。 Iv'e看到了一些建议,但它们都包括使用自己的服务器,这是我不想做的事。

I hope this isn't a duplicate but I looked around and couldn't find anything in the docs. Iv'e seen a few suggestions but they all include using your own server, which I do not want to do.

推荐答案

在应用程序卸载删除应用程序设置,因此除非他们的备份应用程序设置,每次他们重装的时候,他们就会失去前进。如果他们这样做的备份应用程序设置,然后恢复他们实际上将恢复您的设置,这表明他们已经收到了他们的硬币:)我不明白为什么这会不会是一个快速的解决办法。

App settings are removed when the app is uninstalled, so unless they backup the app settings they will lose progress every time they "reinstall". And if they do backup the app settings, then restoring them would actually restore your setting indicating that they have already received their coins :) I don't see why this wouldn't work as a quick solution.

唯一真正安全的方法是做到这一点,你控制的服务器上,但如果你没有访问到,然后做它在应用程序的设置应该工作 - 有些人可能会避开它,但他们会避开pretty多的东西,这是不值得的精力去prevent这一点。

The only really secure way would be to do it on a server which you control, but if you do not have access to that, then doing it in the app settings should work - some people might get around it, but they will get around pretty much anything and it is not worth the energy trying to prevent that.

作为一个附加的检查,你也可以唯一获此殊荣的硬币,如果用户现在没有(这我假设将是一个初始的情况下安装) - 这样他们不能保持清除您的设置获得的硬币(如果他们根植)。

As an additional check you could also only award the coins if the user has none (which I am assuming will be the case on an initial install) - that way they can't keep getting coins by clearing your setting (if they are rooted).

这篇关于应用内结算的设计 - 如何给上先安装用户免费项目的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-19 18:34