Hi, I install the app initially and if I start it again and all images are downloaded and the database is populated, I expect to continue.
But.... I test for the existence of the DB and it appears not to be there although it does exist on the same path?
The SQL.Initialize function verifies it?
I have tried reversing the code to check if the file exists = false which didn't work and also true. It doesn't work?
Any ideas please?
Malky
But.... I test for the existence of the DB and it appears not to be there although it does exist on the same path?
The SQL.Initialize function verifies it?
B4X:
Sub Activity_Create(FirstTime As Boolean)
Start = False
CreateDir
ToastMessageShow(SD_PATH, True)
Log("PATH = " & SD_PATH)
SQL1.Initialize(SD_PATH, "homerbg.db", True)
scvMain.Initialize(500)
Activity.AddView(scvMain,0,0,100%x,100%y)
' Query db to see if the app has been activated
'SQL1.ExecQuerySingleResult("SELECT appActivated FROM system")
If (File.Exists(SD_PATH, "homberbg.db") = True) Then
ToastMessageShow("Doesn't exist......" & SD_PATH & "homberbg.db", True)
Log("DB exists......" & SD_PATH & "homberbg.db")
FillLangScrollView
Else
ToastMessageShow("Creating............." & SD_PATH & "homberbg.db", True)
CreateSystemTable
InsertDefaults
CreateDictionTable
'FetchDictionList
CreateMenuTable
FetchMenuList
CreateLangTable
Log("Going for langs")
FetchImages ' Download all required images at once
'FetchLangList
End If
End Sub
I have tried reversing the code to check if the file exists = false which didn't work and also true. It doesn't work?
Any ideas please?
Malky
Attachments
Last edited: