How to control the expiration of a trial version for an Android app?

I developed an application that I want to share with my clients. I want to share my test by observing the following points.

  • The application must expire (i.e. the user cannot switch from the main action) after 30 days.
  • My application does not require an Internet connection, so I don’t want to control the trial expiration by managing a server on which IMEI devices or something like that can be stored.
  • I want to limit the user's use of the application, even if he uninstalls and then installs my application again.
  • I want to protect the trial version of the application from manually changing the date commonly used by users.

I planned to maintain a file for my application with a first run time marker stored in it, which can be compared with the GPS time in each run, but the problem I am encountering here is file storage. If I save the file in internal memory, it is deleted when the application is deleted and cannot be used when the user reinstalls the application, and if I store it on the SD card / external memory, it is vulnerable to deleting the user. I investigated this question wherever I can, but did not succeed. Any idea or suggestion you guys would be a relief. :-)

+6
source share
1 answer

There will be access to the Internet when the application is installed, or they will not be able to install it.

Just ask the user to activate the application with the server on first use. The application receives the message "this application was first activated on yyyy-mm-dd" from the server and stores this information in a file in internal storage. From now on, the user does not need to be online to use the application.

0
source

Source: https://habr.com/ru/post/919647/


All Articles