简体   繁体   English

是否可以设置apk(application)android的到期日期?

[英]Is it possible set expiry date of apk(application) android?

Is it possible to create an apk & set an expiry date in it , application will be automatically deleted from mobile device when that date comes. 是否可以创建apk并在其中设置有效日期,当该日期到来时,应用程序将从移动设备中自动删除。 Don't want device to be rooted for this.Want the solution should work both for rooted & Unrooted device.Is it possible to do so? 不想为此设备植根,该解决方案是否应该对已植根和未植根的设备均适用,是否可以这样做?

I don't think this is possible without a custom system, because you would need to do the following things: 我认为没有自定义系统是不可能的,因为您需要执行以下操作:

  • Edit Android's Application Installer to look in the application's manifest for something like expirationDate and compare it with current date. 编辑Android的应用程序安装程序,以在应用程序清单中查找expirationDate之类的内容 ,并将其与当前日期进行比较。
  • If the expiration date is not reached yet, you would start a new Handler thread to check the date every hour or every day, what you want. 如果尚未到期,您将启动一个新的Handler线程来每小时或每天检查一次您想要的日期。
  • If the expiration date is reached then, the application would be automatically uninstalled. 如果到了到期日期 ,则将自动卸载该应用程序。

And to install a custom system, you MUST root your device. 要安装自定义系统,您必须将设备root。

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

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