How to Manage Offline Trial Expiration for an Android Application?

2.3k Views Asked by At

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 (i.e. User cannot move from main activity) after 30 Days
  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.
  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. 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. I have investigated this issue from everywhere I can but got no success. Any idea or suggestion by you guys would be a relief. :-)

1

There are 1 best solutions below

0
On

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. From that point on, the user won't need to be on-line to use the app.