Answer the question
In order to leave comments, you need to log in
Where to store the launch date of the application for Trial-check?
Good afternoon!
Please tell me where in the android application to store the date of the first launch for counting the Trial-period (Free-application)?
As I understand it, if this is stored in the settings file in the application folder, then this file can be deleted in the system application manager.
Answer the question
In order to leave comments, you need to log in
You need a server . Every time the application starts on the device, it sends
a unique phone ID to the server . If the server already has this ID, then it checks if the trial period has expired or not. This is the most reliable solution. Of course, there are others (for example: store the date in SharedPreferences
or database , but they can easily be done by reinstalling the application or changing the date on the device).
If you store data in a file and the user deletes it, you can simply not start the application, catching an Exception, but if he changes the data in the file, then it will be dangerous.
You can also put a "bomb" in the code.That is, hard-code the end date of the trial period in the application. And when the application is updated in the store, shift it to a later date. Minus - for all users, the application will be killed at the same time.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question