开发者

How to program a safe timer (in-app-purchase)?

开发者 https://www.devze.com 2023-02-03 07:30 出处:网络
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 proble

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 me开发者_如何学JAVAans 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,


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消