Android Question Execution after installation

mberthe

Member
Licensed User
Longtime User
My app is a B4A app (not B4X)
I will want to run the code (in an activity) only when the app is first installed and run or when a new version is released.
How to do this.
 

Brian Dean

Well-Known Member
Licensed User
Longtime User
When your app runs look in DirInternal for a file called "File1.txt". If it is there then exit immediately. Otherwise continue your first run and finish by creating a file called "File1.txt" in DirInternal. When you release the next version look for a file named "File2.txt". And so on.

A slightly better plan would be to look for a file called "Marker.txt" and change the content each time that a new app level is run.
 
Upvote 0
Top