简体   繁体   English

如何管理Android应用程序的脱机试用期限?

[英]How to Manage Offline Trial Expiration for an Android Application?

I have developed an application that I want to share with my clients. 我开发了一个我想与客户分享的应用程序。 I want to share its trial, taking care of following points 我想分享它的试验,照顾以下几点

  1. Application should expire (ie User cannot move from main activity) after 30 Days 应用程序应在30天后过期(即用户无法从主要活动转移)
  2. Internet connection is not required for my application so I don't want to manage trial expiration by managing a server where device's IMEI can be stored or sort of thing. 我的应用程序不需要Internet连接,因此我不想通过管理可以存储设备的IMEI或其他东西的服务器来管理试用期限。
  3. I want to restrict user from using application even if he uninstall and later on re-Install my app. 我想限制用户使用应用程序,即使他卸载并稍后重新安装我的应用程序。
  4. I want to protect application trial against a manual date changing hack normally applied by users 我想保护应用程序试用以防止用户通常应用的手动更改黑客攻击

I was planning to maintain a file for my application with time token of first run saved in it which can be compared with GPS time on each run but the issue I am facing here is of file storage. 我打算为我的应用程序维护一个文件,其中第一次运行的时间标记保存在其中,可以与每次运行的GPS时间进行比较,但我面临的问题是文件存储。 If I save a file in Internal memory it gets deleted with application un-install and cannot be used when user reinstalls the app and if I store it on SD card/ External memory it is vulnerable to user deletion. 如果我将文件保存在内部存储器中,它会在应用程序卸载时被删除,并且在用户重新安装应用程序时无法使用,如果我将其存储在SD卡/外部存储器上,则很容易被用户删除。 I have investigated this issue from everywhere I can but got no success. 我从无处不在的地方调查了这个问题,但没有成功。 Any idea or suggestion by you guys would be a relief. 你们的任何想法或建议都会让人感到宽慰。 :-) :-)

There will have internet access when the app is installed, or they wouldn't be able to install it. 安装应用程序时会有互联网访问权限,或者他们无法安装它。

Simply require that the user activate the app with a server the first time they use it. 只需要用户在第一次使用服务器时激活应用程序。 The app gets a "this app was first activated on yyyy-mm-dd" response from the server, and stores that info on a file in internal storage. 该应用程序从服务器获得“此应用程序首先在yyyy-mm-dd上激活”响应,并将该信息存储在内部存储中的文件中。 From that point on, the user won't need to be on-line to use the app. 从那时起,用户将无需在线使用该应用程序。

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

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