Install app FirstTime

sigster

Active Member
Licensed User
Longtime User
Hi hope someone can help me with this Please

I am try to use Save INI to write APP Version to textfile when I run the app for first time
so when I upgrade from Market and APP Version number and Version number in the file is not the same I copy new Database

but when I run the app from Basic4android to my Mobile
FirstTime don't work it upgrade the text file each time I run the app from basic4android to my Mobile


Code: Copy
File.MakeDir(File.DirRootExternal,"islenskapp")
Dim Writer As TextWriter
Writer.Initialize(File.OpenOutput(File.DirDefaultExternal,"islenskapp.txt",True))
 
    If FirstTime Then
       SaveINI  ' write Verion of the app to text file when I run the app for FirstTime 
    End If

   LoadINI   ' to check if version on the app are new and copy database and write new version number to textfile

Regards
Sigster
 
Independently of whether it is the very first time you run your app, a good way would be to check everytime your app starts, whther the file containing the app version and other info, exists. For this, simply use 'file.exists'. If it is found, load data, if not, create it (or recreate it in case of an accidental deletion by user for e.g.) and then proceed to neccessary checks.
 
Upvote 0
I would personally use a file to store the information. There are a few good link on the topic on this forum.

E.g. I personally use a file for storing external DB connection strings for monitoring MySQL DBs. Use 'If File.Exists(file location) Then blah blah blah', if there is no file then create one and store your data in it.


Sent from my HTC Desire using Tapatalk 2
 
Upvote 0
Back
Top