Please help to implement a scenario with a trial version of my game. How to make the game worked 14 days only?

Hello again fellow community members.

Please help to implement a scenario with a trial version of my game.
How to make the program (game) worked 14 days and after that it would be not possible to load it?
And while these 14 days have expired at the start of the program would appear warning window:

Unregistered Version (14-day trial)!

After 14 days at boot would appear only window:
"Sorry, but your 14-day trial has expired !
Please, welcome to oursite.com
"

And the program did not work (only the warning window abou “trial has expired”).
If anyone has a working code would be very grateful.

Thank you for your help.
 

You would need to do the following:

  1. When the user signs up for a trial, generate some kind of trial key on your server and give it an expiration date
  2. Provide the key to the user through the channel they are using to sign up. For example, if the user signs up to your trial with an email account, send a mail with the key. If they sign up with their phone number, send an SMS. Etc.
  3. When starting your app, go online to check the that the key is still valid. If not, inform the user that the trial has expired
  4. (Optional) restrict the number of times a user can request a trial - for example if they’re signing up with their email, it could be that the trial can only be requested once per email address

Alternatively, you can do a “naive” implementation where you store the data locally, i.e. store the date when the app was downloaded directly on the phone. You could then warn the user when 14 days have passed, but they could simply re-download the app to get a new trial (or change the system time to extend the existing trial). That could also be OK if you just want to remind your users to buy your software and don’t care if they can easily start a new trial.

You would need to do the following:

  1. When the user signs up for a trial, generate some kind of trial key on your server and give it an expiration date
  2. Provide the key to the user through the channel they are using to sign up. For example, if the user signs up to your trial with an email account, send a mail with the key. If they sign up with their phone number, send an SMS. Etc.
  3. When starting your app, go online to check the that the key is still valid. If not, inform the user that the trial has expired
  4. (Optional) restrict the number of times a user can request a trial - for example if they’re signing up with their email, it could be that the trial can only be requested once per email address

Alternatively, you can do a “naive” implementation where you store the data locally, i.e. store the date when the app was downloaded directly on the phone. You could then warn the user when 14 days have passed, but they could simply re-download the app to get a new trial (or change the system time to extend the existing trial). That could also be OK if you just want to remind your users to buy your software and don’t care if they can easily start a new trial.