Sqlite db - download from the web

Hello.
I have the file dbSvadba2024.sqlite located on the web server - hosting.
I'm trying to download it to my mobile phone in the ASD app.
I keep getting the error: Can only download HTTP/HTTPS URIs: https://sqlite.svadbamatolivka.online/dbSvadba2024.sqlite
Note: You will not see another error reported for 5 seconds.
I use:

obrázok
The gURL is: https://sqlite.svadbamatolivka.online/dbSvadba2024.sqlite
Where am I doing wrong?
Shouldn't that file be downloaded, e.g. to Download on mobile and then to ASD? I can't deal with it.
Ondrej

Where did you get this extension? Is it by @Anke ?

Did you change your mind again?
Using a downloaded sqlite database locally is for one user only, not for multiple users

Taifun

Hello.
It doesn't want to work for me.
So I'm trying my best...
If I put the sqlite db on web hosting, will it work there? With multiple users?
I guess I don't understand it at all anymore...
Senior1954

Unfortunately, even after this fix I get the same error. Both Companion and .apk...

Senior1954

Check the URL (it should work if the URL is correct).
Which Android version?

If Android 10 / 11+, this should do it:

image

Sorry, correction: If Android < 11 you can set DefaultFileScope = Legacy and download to the relative path (i.e. if only the file name is specified, the file will be saved in the root dir of the external storage). On Android < 11, WRITE permission is required for this. Of course, this no longer works on Android 11+. Here you can only save (download) to one of the two Shared folders, namely /Documents or /Download.

If DefaultFileScope = App was set, it will be loaded into the ASD on all Android versions.

@TIMAI2 TimAI2 explained what needs to be done here

I never tried this, so I do not know, if a sqlite database file is also used in this case and if you can replace that file... @TIMAI2 might know more...
I would use MySQL in this case...

Taifun

I believe we really need to understand your workflow and what you are hoping to achieve with all of this.

I'll try to explain:

  • I have a database on the web...hosting, which should be accessed by several users
  • at first I thought I would try it with MySQL, but it seems very complicated
  • so I want to use SQLite ...store it on the web ....and users would use it for stages.......it's not an optimal solution, but I don't know any other way.

I have now contacted the web hosting where I have this db stored. Apparently I have to download it as a zip format, because there is no other way..... There is such an option in AppInventor.....save it in a zip?

Senior1954

Please explain "stages" ?

You do not say why you have to download the database to an app ?

Write down the workflow for an app user....

I apologize for the confusion. Web hosting uses MySQL and Php.
So it looks like I'll have to use MySQL after all...
Senior1954

If you have php then if you can install sqlite on your server, then you can follow my guide.

or just use MySQL which is already available

and follow the MySQL tutorial here App Inventor Tutorials and Examples: MySQL | Pura Vida Apps

Taifun