Sub Globals
Dim fname As String 'the file needs to be in the assets folder
End Sub
Sub Activity_Create(FirstTime As Boolean)
fname = "countriespopulations2019.csv"
Dim rp As RuntimePermissions 'need runtimepermissions lib cheched
rp.CheckAndRequest(rp.PERMISSION_WRITE_EXTERNAL_STORAGE)
wait for Activity_PermissionResult(Permision As String, Result As Boolean)
If Result = False Then
MsgboxAsync("No permission to access external storage", "")
Return
Else
Log("granted permission")
If File.Exists(File.DirRootExternal, fname) =False Then
File.Copy(File.DirAssets,fname, File.DirRootExternal, fname)
Log("file copied to dir external")
End If
End If
'Here you initialize the database and create it in file.DirRootExternal
End Sub