Hello,
I have a new Idea for a new App.
I need a Database, rhat I can access offline.
Can you suggest one?
I only want to record nice places.
Store the Coordinates and a short Text and the name of a Fotofile, I made.
I am afraid, that TinyDB will not fit my needs, because I wanr ro store a row of data in a table and I did not find out, how Data in a row in TinyDB can be associated together.
Do you habe an Idea? Please help me. I love MySql.
Ciao. Emanuel
TIMAI2
April 12, 2025, 9:28am
2
SQLite offers a local database:
SQLite
or
SImpleSQLite
Thank you very much TIMAI.
I instaled it and created my first table there.
Can you please tell (show) me, how to access it from AI2?
Thank you very much,
Emanuel
Peter
April 12, 2025, 10:22am
4
In the simplesqlite topic there is a link to a tutorial from Tim
INTRO
Most, if not all, Android devices have an sqlite program in there somewhere, Android uses sqlite databases as a part of its infrastructure. The good news is the program is available to us in AppInventor, and we can use it to manage large...
1 Like
one single example says more than a thousand words…
Use tinydb
Call tinydb store value tag= place name
value= make a list
unfortunately, it doesn‘t work:
Is it important to place the .db file in a special folder?
My phone is not routed,
did you read the document for location of the db? what about set the db only with a name? no full/absolute path?
anyway, what the error message?
TIMAI2
April 13, 2025, 11:05am
10
What Android version are you testing on?
You would normally NOT create a directory in the root (/storage/emulated/0) for more modern devices.
Just put your database file in Documents or Download and try that.
ABG
April 13, 2025, 11:24am
11
Here are a couple of more samples to read, to get a feel for how to work with lists and TinyDB tags and values ...
Some TinyDB samples for you
Sorry, didn‘t change anything.
Taifun
April 13, 2025, 12:21pm
13
Usually you upload your database into the assets of your app and import it from there
You can see how it is done with my sqlite extension here
Else to access non media files on newer devices you need SAF, see also Some basics on Android storage system
Taifun
TIMAI2
April 13, 2025, 12:24pm
14
You did not answer this...
Is there an alternative Sql thing, that is easyer supported by AI2?
Taifun
April 13, 2025, 2:53pm
17
It does not look like you read my previous answer
Usually you upload your database into the assets of your app and import it from there
You can see how it is done with my sqlite extension here
Else to access non media files on newer devices you need SAF, see also Some basics on Android storage system
Taifun
Taifun
Anke
April 13, 2025, 2:59pm
18
Emanuel_Kury:
I have Android 10
Then you must request WRITE_EXTERNAL_STORAGE
permission (e.g. in the Screen.Initialize
event).
Thank you very much, dear Anke.
Hello Anke,
What kind of permission should I use on my Android 14 Device?