How to: A simple way to limit usage of an app presented for evaluation purposes

1) Clock to time limit the functionality of an app or restrict its usage beyond a specific date.

The developer must make a manual calculation to determine the app's 'expiration' date by using the DoIt function. You could probably automate this determination with some ingenuity.

  • create your app
  • add the indicated blocks into the Screen1.Initialize block of your app. Remember to add the app's expiration date before you provide your app to someone to test.
  • compile the modified app. It is now a time limited version of your app you can provide to someone to evaluate.

How it works:

  • the call Clock1.Now Block gets today's date

  • adds days to today's date (the example adds 15 days) to today's date/time. This is the calculated expiration date.

  • the call Clock1.GetMillis converts the expiration date to ms (1602514565464 in this case. The Millis is equivalent to a date of "10/12/2020 09:55:54 AM" ). Determine the expiration date in Millis by doing a DoIt (shown in the code image) or write a simple app to determine the number and use the simple app to calculate today's date plus the number of day you want the app to work; transpose the calculated value into your limited time app's code.

  • the if call Clock1.GetMillis <= 1602514565464 determines if the app has expired yet

  • if the app usage has expired (the present date is past the expiration date), the code branches to the else statement (which says Sorry). The app uses the Clock to terminate the app (throw it into hibernation).

  • otherwise the branching shows the 'this is a trial period' splash notification and allows the app to run.

  • Clock documentation: Clock

How to test
Instead of using the Add Days Block during development/testing, use Add Minutes to test.

Is this technique fool proof? Probably not but it might be sufficient.

2) Clock to display a notification every five minutes or so (set the TimerInterval to 5 minutes [300000 ms ]). The notification might display wording something like "this is an evaluation version of the app". A friendly annoyance without limiting the functionality of app might prompt the user to obtain a non-limited version of the app .