Here is what you need to do Fernando to get it to work:
In main activity_Create, see the line I added :
Sub Activity_Create(FirstTime As Boolean)
DBFileDir= DBUtils.rp.GetSafeDirDefaultExternal("") 'mahares
If FirstTime Then
DBFileDir = DBUtils.CopyDBFromAssets(DBFileName)
End If
SQL1.Initialize(DBFileDir, DBFileName, True)
and in DBUtils module change:
Private rp As RuntimePermissions
to:
Public rp As RuntimePermissions
and change this below sub back to:
Sub CopyDBFromAssets (FileName As String) As String
Dim TargetDir As String
If File.ExternalWritable Then
TargetDir = File.DirDefaultExternal '<----- mahares
Else
TargetDir = File.DirInternal
End If
If File.Exists(TargetDir, FileName) = False Then
File.Copy(File.DirAssets, FileName, TargetDir, FileName)
End If
Return TargetDir
End Sub