简体   繁体   English

Android-设置使用情况标志

[英]Android - Setting usage flag

I am currently creating an app and would like to create a demo version (free) and a full version. 我目前正在创建一个应用,并想创建一个演示版(免费)和完整版。

However, I am wondering how I can set some sort of flag so that when the demo version has been used 5 times, you have to buy the full version to continue using. 但是,我想知道如何设置某种标志,以便在演示版本使用5次后,您必须购买完整版本才能继续使用。 This usage will be detected on a submit button. 将在“提交”按钮上检测到此用法。

I was considering setting a flag in the app, however releasied that the user could uninstall the app and then re-install it overcoming my set flag (as this would set it back to 0). 我当时正在考虑在应用程序中设置一个标志,但是释放了用户可以卸载该应用程序,然后克服我的设置标志重新安装它(因为这会将它设置回0)。

Has anyone got any clever solutions for my little dilema? 有没有人为我的小困境提供任何明智的解决方案?

Thanks 谢谢

您可能想尝试此答案中的一种技术: https : //stackoverflow.com/a/996288/1205715

I think that is not possible with an local application. 我认为使用本地应用程序是不可能的。 File saving to sdcard with strange filename can be a way but It is not perfect. 用奇怪的文件名将文件保存到sdcard可能是一种方法,但这并不完美。 In my opinion, Right way is using an application server that manages user run times with unique UUID. 我认为,正确的方法是使用应用程序服务器来管理具有唯一UUID的用户运行时间。

It might also be worth thinking about an alternative approach. 也可能值得考虑替代方法。

In app purchases are now available, so you could have a free and a restricted section in your app, and use the in app purchase to unlock the restricted section. 现在可以进行应用内购买,因此您可以在应用中拥有免费和受限部分,然后使用应用内购买来解锁受限部分。 You see more developers going with this approach these days, rather than managing two versions of the app. 您会看到,如今有更多的开发人员采用这种方法,而不是管理该应用程序的两个版本。

Also worth considering the fact that if you have a paid version of the app it can be pirated pretty quickly, one person just needs to get their hands on the full apk. 同样值得考虑的一个事实是,如果您拥有该应用程序的付费版本,可以很快被盗版,那么一个人只需要获得完整的apk。 However, if you go with the in app purchase model you will be letting google handle a lot of these issues for you.... just a thought, and the road I will be taking with my next app. 但是,如果您采用应用程序内购买模式,则会让Google为您处理很多此类问题。...只是一个想法,以及我将在下一个应用程序中走的路。

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

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