如何编写安全计时器(应用内购买)?
也许这里有人以前已经这样做过 - 我不知道如何安全地解决这个问题...... 我的客户想要一种 Android 应用程序的应用内购买。但这只是次要的 - 我的问题是:应该有一种“租赁”系统。这意味着有人在特定时间范围(即 10 天)内购买商品。该应用程序仅在他购买该商品时才在线 - 因此我需要一种安全的方法来让该商品在 10 天后离线过期。如果我使用内部时钟,有很多方法可以操纵它。
有什么建议我可以安全地完成这个(相对)吗?
谢谢你,
Maybe someone here had already done this before - I'm not sure how to solve this safely...
My client want a kind of in-app-purchase for an Android application. But that's only subsidiary - my problem is: there should be a kind of "rental" system. That means someone buys i.e. an item for a certain timeframe (i.e. 10 days). The App is only online when he buys that item - so I need a safe way to let this item expire offline after 10 days. If I use the internal clock, there are to much ways to manipulate this.
Any advice how I can accomplish this (relative) safely?
Thank you,
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
由于它是从“几乎始终连接的设备”运行的,因此您可以使用外部源来检查时间(每次使用租用的物品时检查一次,或者如果您发现不方便则定期检查),
这就是它的主要完成方式,它不依赖于时间戳,而是依赖于证书,该证书应该针对证书服务器进行检查并且更难以篡改。
As it is run from an "almost always connected device" you could use an external source for checking the time ( and check it each time it use the rented item or periodically if you find it inconvenient),
It is how it is mostly done, and instead of relying on timestamp it relies on certificate that should be checked against a certificate server and is harder to tamper with.