Sub Process_Globals
Dim ProductionMode As Int = 0
Dim MediaPlayer1 As MediaPlayer
'----------------------------Start SQLite--------------------------------------------------------------------------------------------------
Dim dbFileDir As String :dbFileDir = File.DirInternal
Dim dbFileDirEx As String :dbFileDirEx = File.DirDefaultExternal
Dim dbFileName As String :dbFileName = "edbq_lite_LOC.db"
Dim UserHTML As String = File.DirDefaultExternal & "/UserHTML/"
Dim dImagesPath As String = File.DirDefaultExternal & "/dImagesPath/"
End Sub
Sub Globals
'These global variables will be redeclared each time the activity is created.
'These variables can only be accessed from this module.
Dim SQL1 As SQL
Dim btnIntro As Button
Dim btnAudio As Button
Dim btnIssues As Button
Dim btnProducts As Button
Dim btnDocuments As Button
Dim lblVersion As Label
Dim Panel1 As Panel
Dim Timer1 As Timer
Dim btnCS As Button
End Sub
Sub Activity_Create(FirstTime As Boolean)
If FirstTime Then
File.MakeDir(File.DirDefaultExternal, "UserHTML")
File.MakeDir(File.DirDefaultExternal, "dImagesPath")
File.Delete(File.DirInternal, dbFileName) ' only for testing, removes the database
'Check if the database already exists
If File.Exists(File.DirInternal, dbFileName) = False Then
'copy the default DB
File.Copy(File.DirAssets, dbFileName, File.DirInternal, dbFileName)
'if not, initialize it
SQL1.Initialize(File.DirInternal, dbFileName, True)
'and create it
'CreateDataBase
'copy the default DB
File.Copy(File.DirAssets, "edbq_lite_LOC.db", File.DirInternal, "edbq_lite_LOC.db")
Else
'if yes, initialize it
SQL1.Initialize(File.DirInternal, "edbq_lite_LOC.db", True)
End If
End If
Activity.LoadLayout("Main")