Expiration time for application

Hi friends,

in this post I showed an extension about work with files and directories:


This is an example with that extension.

Expiration time for application.

  • When install app, a file with SystemTime is create in /mnt/sdcard/.secreto/.myfile.txt

  • When run app, check if actual SystemTime is over old-SystemTime + time_life

  • If you uninstall app, file /mnt/sdcard/.secreto/.myfile.txt (with first time installation) remains.

  • In this example, time_life app is only 3 minutes (180000 milliseconds).

  • Juan Antonio Villalpando.

  • Al instalar la aplicaciĂłn se crea el archivo /mnt/sdcard/.secreto/.myfile.txt con el instante actual, por ejemplo 15768776984734. Ese nĂşmero y archivo permanecerá siempre hasta que el usuario sepa donde está y lo quiera borrar.

  • Además la aplicaciĂłn tiene una variable con su tiempo de vida (time_life_ms), he puesto solamente 3 minutos, 180.000 milisegundos para hacer las pruebas, lo normal serĂ­a poner 15 dĂ­as o un mes (expresados en milisegundos).

  • Al cabo de ese tiempo cuando intentemos iniciar la aplicaciĂłn nos indicará que ha superado su tiempo de uso.

  • En fin, lo puedes ver con más detalle en mis tutoriales…

  • Tutorial in Spanish: http://kio4.com/appinventor/282_extensiones_explorador_opera.htm

p282C_expiracion.aia (14.7 KB)



@Juan_Antonio I used your extension in my app and it made the compiling prosses to crash and pop up this message:

It is a really good concept. I’ll be interested if you fix it. Thanks

is this the only extension you are using?
what happens, if as test you remove the extension? does the app then build fine?

Don’t forget to make a back up before you delete any components @ehg as undoing this can be error prone and you may end up losing some of your work.

@Taifun @domhnallohanlon Yes I deleted the extension and everything worked again. What do you think?

@Taifun @domhnallohanlon Do you guys know how can I create a directory besides using this extension?

How to create a directory

Hi egh,

can you try this app, please?

Create directory, file, add content to file, show file, delete directory.

Test_Make_Dir_File.aia (13.7 KB)

@Juan_Antonio It seems to work well. Let me keep using it and if I encounter any problems I’ll let you know. Thanks

@Taifun I see, very clever. You never disappoint me Taifun, thanks. :smile:

Why not use the extension below , get installation date, calc the difference with today’s date in days and if the result is above lets say 30 days (or any other limit you want to set as the free trial period) to notify the user that the app expired and then close …

With the same logic you can also make the app ad free for some period and after that period ends start displaying them…


because the user can always reinstall the app (or delete its data) and get another trial period

With ToolTime Extension if you uninstall an app and then reinstall that app, change new first install app date.

Instead if save install date in a folder and file (“secret”), although uninstall app, this file remains.

creo que esto puede ayudar al tema

Then… make the user somehow not willing to uninstall the app or clear data. For example if there is no possibility to export data and re-import them after the new installation then user will not be able to have the app as if never uninstalled…

Also there are several file browsers (for example total commander) that are capable of showing hidden files and folders and there you have the ability to modify the file or even delete it…

The only other thing that I can think is to have an expiration date as part of the blocks and make an app valid until that specific date, but this has also a limitation… as mentioned in the link by @Andres_Cotes ( I read the post after typing my thoughts… :laughing: )

For me the best option is to limit functionality in trial version of any app and give full access in a paid version…

1 Like

“that are capable of showing hidden files”… but if app create folder and file in (example) /mnt/sdcard/etc/andr/som23

is very difficult user know in that directory is file with date.

App must create folder and file in a strange place (path) so that the user does not suspect that the date is there.

In link of by @Andres_Cotes, you we can look Tercer método, app get DeviceId and load this number in a remote hosting with PHP and MySQL.
When user run app, app connect with remote MySQL and check DeviceID (necessary internet)

This is an example of Tercer método, is in Spanish:


In that example user can run app 3 times.
[first time, not exist number DeviceId —> create]
[others time suma +1]

That project need extension: TelefonoDatos for get DeviceId (IdDispositivo)

Extension TelefonoDatos (info. phone) and extension Localizacion

in http://kio4.com/appinventor/231_extension_infotelefono_cellid.htm

whats the use of this aix . im getting this result

& block are as

1 Like

that extension seems to be similar to the telephony manager extension …

@Juan_Antonio remember to follow the naming conventions, which is UpperCamelCase for property, method and event names (i.e. the first letter should be a capital letter) and lowerCamelCase for parameter names

@Shivendra_Kr_Sahu you might want to read the documentation of the telephony manager extension





I looked at this, but please tell me that the reading of the photo I have sent, according to the reading, is getting this reference Sorry, no one Base Station was found! .
Why is this