Taifun
October 30, 2022, 12:54pm
13
From the documentation
The simplest way is to upload the database into the assets of your app, see also @TIMAI2 's guide METRIC RAT AI2 - Working with SQLite
Else use the file component to copy it from shared storage /Download or /Documents to the ASD and import from there
Taifun
TIMAI2
October 30, 2022, 2:11pm
14
Which extension are you using ? (SQLite1) ?
aiotech
October 30, 2022, 8:09pm
15
Mmmm... may be OK set column headers to false using a clock started by Screen1.Initialize?
TIMAI2
October 30, 2022, 10:01pm
16
Column Headers Bug now fixed, download latest version 3
Also ListFixer merged to main extension
SimpleSqliteV3
TIMAI2
October 30, 2022, 11:47pm
18
For Android <10 there is a bug (typo ?) that carried over from the original extension
return getExternalStoragePath() + "/AppInventor/data/";
should read
return getExternalStoragePath() + "/AppInventor/assets/";
Should now be fixed
For Android 12, just use //myDatabase.sqlite
, extension is looking for //
for asset files
Anke
October 30, 2022, 11:48pm
19
Android 8.1 - a relative path seems to work:
2 Likes
Anke
October 30, 2022, 11:53pm
20
Android 11: (this path is redirected to the ASD)
2 Likes
Anke
October 30, 2022, 11:56pm
21
... the same of course on Android 10+
Anke
October 31, 2022, 12:08am
22
On Android ≤ 9 a relative path must therefore be set (at least as long as this is not adjusted in the extension).
TIMAI2
October 31, 2022, 9:39am
23
Hmmm, looks like
is doubling up on /storage/emulated/0
....
Will test some more
Yes, I think (and find on the forum next I post this question) this extension dont work with Android 10. The question is all my code is coded with the SqlLite extension and if I go to use the SimpleSqlite extension I will recode all my app. Really there are no way to "import" a empty (preformated with tables) database to use with sqllite? Any solution welcome. thanks. Ex. move (with the app) the database to a directory that can use the sqlite extension?...
Solved: I have used the method "dbname" of simplesqlite to change the name (and dir) of the db to the name (and dir) of db that expects the extension sqllite before import the database. To import the database I used the method ImportDatabase of simplesqlite extension. thanks.
TIMAI2
November 1, 2022, 8:10am
32
You could have done exactly the same thing with Taifun's extension. Have you updated to the latest version which works with Android <=10?
TIMAI2
November 2, 2022, 9:38pm
34
@Anke , many thanks for all your help with sorting out file paths
I got this error:
after tick the returncolumnheaders then untick, this error message will not popup again.
TIMAI2
November 3, 2022, 12:05am
36
Is this with the latest version ?
Try with V3 from link in first post....
yes, it's v3 from first post
TIMAI2
November 3, 2022, 8:09am
38
Hmmm, just tested and you are correct. Thought I had this fixed. I made it go away, but now has come back ? More work to do....