Hi everyone,
I turn back to my previous post https://www.b4x.com/android/forum/threads/sql-error.162490/#post-996940 regarding the sql db error. Now i try to test my app on samsung j5 ( Android 7) the problem is the same. The code below works perfect on Andoris 13 but on Android 7 db is renamed by OS (i think) as a corrupt.
here is the log
true
FileName: virtual_assetsFileSize : 4096
FileName: pos.db FileSize : 0
FileName: pos.db.corrupt FileSize : 303104
/data/user/0/POS.app/files
Can anybody tell me how can i solve this issue ?
Thank you
I turn back to my previous post https://www.b4x.com/android/forum/threads/sql-error.162490/#post-996940 regarding the sql db error. Now i try to test my app on samsung j5 ( Android 7) the problem is the same. The code below works perfect on Andoris 13 but on Android 7 db is renamed by OS (i think) as a corrupt.
B4X:
Private Sub B4XPage_Created (Root1 As B4XView)
Root = Root1
Root.LoadLayout("MainPage")
MP=B4XPages.MainPage
Log(File.Exists(xui.DefaultFolder, "pos.db"))
For Each flist As String In File.ListFiles(xui.DefaultFolder)
Log("FileName: " & flist &" FileSize : "&File.Size(xui.DefaultFolder,flist))
Next
Log(xui.DefaultFolder)
If File.Exists(xui.DefaultFolder, "pos.db") = False Then
File.Copy(File.DirAssets, "pos.db", xui.DefaultFolder, "pos.db")
Log(File.Exists(xui.DefaultFolder, "pos.db"))
End If
CHECK_TABEL
SQL1.Initialize(xui.DefaultFolder,"pos.db",True)
true
FileName: virtual_assetsFileSize : 4096
FileName: pos.db FileSize : 0
FileName: pos.db.corrupt FileSize : 303104
/data/user/0/POS.app/files
Can anybody tell me how can i solve this issue ?
Thank you