App with DB offline

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

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

In the simplesqlite topic there is a link to a tutorial from Tim

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?

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.

Some TinyDB samples for you

Sorry, didn‘t change anything.

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

You did not answer this...

I have Android 10

Is there an alternative Sql thing, that is easyer supported by AI2?

It does not look like you read my previous answer

Taifun

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?