Android Question How to add date control in the APP?

bskotu555

Member
I want to add date control in the program, set the initial date of 2024-11-1 for the variable tm, obtain the current date when the program starts, compare the two dates, and exit the app if the current date is greater than tm。
 

Brian Dean

Well-Known Member
Licensed User
Longtime User
I want to add date control in the program . . .
If that really is all that you want to do then you could use a server with access to UTC time to record the installation date and disable the app if the trial period is exceeded. But this would not prevent the user uninstalling and reinstalling the app for a new time period. If, as @aeric suggests, your aim is to prevent that then this simple scheme will not work - you need to provide some additional assets, like extra game levels or more functions or a larger database, if you want to get someone to pay for your app.
 
Upvote 0

aeric

Expert
Licensed User
Longtime User
There are ways like reading the device unique id like the advertising id or uuid, hardware serial number or MAC address to counter the misuse. A cracker can also reverse engineering or decompile the code and then remove the checking code.
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…