M mberthe Member Licensed User Longtime User Jun 5, 2021 #1 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.
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.
B Brian Dean Well-Known Member Licensed User Longtime User Jun 5, 2021 #2 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
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.
Erel B4X founder Staff member Licensed User Longtime User Jun 6, 2021 #3 mberthe said: My app is a B4A app (not B4X) Click to expand... (There is no such thing - B4X app) Upvote 0