I am struggling to get B4A to open and read existing sqlite and csv files, and I suspect it has to do with their location.
From the "Text Files" documentation in the "Getting Started & Tutorials" forum, I can see that for File.DirDefaultExternal the location is
<storage card>/Android/data/<package>/files/.
Go to the Files tab in the right pane and add the required files.
These files get packaged in the APK file and are accessed with File.DirAssets.
It is not possible however to open a SQLite database in this folder. You can use DBUtils.CopyDBFromAssetsFolder to copy the file from this folder to a regular folder.
Thanks, I used DBUtils.CopyDBFromAssetsFolder to copy the file to File.DirDefaultExternal and was able to access the data.
Now I have added and edited data, but the next time I run the app I am back to the same old problem of it not being able open the file in the File.DirDefaultExternal location.
How do I open this updated database file when I run the app again?
It seems like the SQLiteDB example uses Files.DirInternal.
The problem with that for my app is that I need to be able to synchronise the sqlite db from the device with the desktop as there is a companion desktop app that also needs to access that same sqlite db.
You can also use Files.DirRootExternal with the emulator.
You to setup the emulator for sdcard and set in the IDE in the Project menu 'Can Install To External Storage'. Just tried it.