The code below is an extract from an app with over 2000 successful deployments. We all know an SQLite database must reside in a read/write directory... even if you are never writing to it. I now have a new user that gets an exception apparently at the SQL.Initialize statement.
He sent this screenshot:
Copying the database from File.DirAssets to File.DirDefaultExternal did not throw an exception so it must follow that the destination folder is read & write. However when the SQL.Initialise statement is executed this happens.
The platform is an HTC One M9 with Android 5.0 Lollipop. Whilst I am waiting for further details of internal/external storage config, has anyone got the faintest idea what might cause this in an apparently mature application ?
B4X:
#Region Project Attributes
#CanInstallToExternalStorage: True
#End Region
Sub Process_Globals
Dim SQL As SQLCipher
End Sub
Sub Activity_Create(FirstTime As Boolean)
If FirstTime Then 'Reinitialize database every run
File.Copy(File.DirAssets,"MyDatabase.sqlite",File.DirDefaultExternal ,"MyDatabase.sqlite")
SQL.Initialize(File.DirDefaultExternal ,"MyDatabase.sqlite",False,z,"") 'I believe it halts here
End If
'Previous coding corrected for misplacement
End Sub
He sent this screenshot:

Copying the database from File.DirAssets to File.DirDefaultExternal did not throw an exception so it must follow that the destination folder is read & write. However when the SQL.Initialise statement is executed this happens.
The platform is an HTC One M9 with Android 5.0 Lollipop. Whilst I am waiting for further details of internal/external storage config, has anyone got the faintest idea what might cause this in an apparently mature application ?
Last edited: