Sub Activity_Create(FirstTime As Boolean)
'clear old DB
If File.Exists(File.DirInternal ,"test.db") = True Then File.Delete(File.DirInternal,"test.db")
If File.Exists(File.DirInternal ,"test_encrypted.db") = True Then File.Delete(File.DirInternal,"test_encrypted.db")
'copy db's to the internal dir
File.Copy(File.DirAssets,"test.db",File.DirInternal,"test.db")
File.Copy(File.DirAssets,"test_encrypted.db",File.DirInternal,"test_encrypted.db")
'add the content of sqlcipher_native.zip to DirAssets
File.Copy(File.DirAssets,"icudt46l.dat",File.DirInternal,"icudt46l.dat")
File.Copy(File.DirAssets,"libdatabase_sqlcipher.so",File.DirInternal,"libdatabase_sqlcipher.so")
File.Copy(File.DirAssets,"libsqlcipher_android.so",File.DirInternal,"libsqlcipher_android.so")
File.Copy(File.DirAssets,"libstlport_shared.so",File.DirInternal,"libstlport_shared.so")
'testing the un encrypted db
SQL1.Initialize(File.DirInternal, "test.db", True )
Cursor1 = SQL1.ExecQuery("SELECT * FROM Version")
Cursor1.Position = 0
Msgbox(Cursor1.GetString("Release") & Chr(10) & "Release Date: " & Cursor1.GetString("Date"),"un encrypted db")
Cursor1.Close
SQL1.Close
'testing the encrypted db
SQLChip.Initialize(File.DirInternal, "test_encrypted.db", False, "test",File.DirInternal)
Cursor1 = SQLChip.ExecQuery("SELECT * FROM Version")
Cursor1.Position = 0
Msgbox(Cursor1.GetString("Release") & Chr(10) & "Release Date: " & Cursor1.GetString("Date"),"encrypted db")
Cursor1.Close
SQLChip.Close
End Sub