Here are the basics, tested compiled.
Filescope in Screen1 designer set to Legacy
I used an image, but your sqlite.db file should work in the same way.
Here are the basics, tested compiled.
Filescope in Screen1 designer set to Legacy
I used an image, but your sqlite.db file should work in the same way.
Thanks for the example.
It works for me in Companion, but not on mobile.
Ondrej
Show us your blocks and explain how you found out, that it did not work to copy the file to ASD
Taifun
I send blocks. How do I send the dbKnihy.sqlite file?
Ondrej
[mod edit: please do not post aia projects containing paid extensions]
Test just one procedure at a time, your call to four procedures at once may be causing a conflict / failure.
You may need to delete the sqlite.db file in /Documents/Zalohy/ before your compile and try the app again. (Reason - not possible to work with files created by another app - e.g. companion app)
I save the dbKnihy.sqlite archive in the folder /Documents/Zalohy. So if I change the version of the .app, this new version will no longer "recognize" the file created by the previous version of the app?
If so, how is the file backup done?
Ondrej
No, in this case it is still the same app, only a new version
@TIMAI2 was talking about first testing using the companion app and storing the file and later trying to read that file after building the app, because theny ou are trying to read a file created by another app...
You forgot to answer this question
Also previously you used a wrong path... what about using the correct path?
Taifun
Hello. The app for copying the dbKnihy.sqlite file from /Documents/Backups/ to ASD does not work for me. That's why I created a test app with only a few blocks. In the input folder, dbKnihy has a size of 49,152. In the output folder after copies, it has only 12,000. Next, the app crashes with a Syntax error. quote in unquoted cell. In the output file, only the android_metadata table is copied... I am attaching blocks...
Can someone help?
Ondrej
You do not appear to have taken any of our advice above.....
Simplify your blocks, and just focus on the copying of the file from shared storage to the ASD.
Once you have that working, then you can start complicating things
Build in small steps, testing and checking at each step to ensure you have files in place and the correct file paths and permissions.
So the conclusion is probably that if I create e.g. in app1 the file dbKnihy.sqlite, so in another app, e.g. app2, I can no longer read that file and copy it to ASD in app2....
Is that so ?
Ondrej
Take us through the journey that your sqilte.db file goes through, step by step, from start to finish, then perhaps we can advise on the best course of action.
so in another app, e.g. app2, I can no longer read that file and copy it to ASD in app2....
Is that so ?
you still can read it using SAF
1.Introduction Description: Basically AI2 wrapper of Storage Access Framework. Using this extension, you can get read and/or write access to a single document or tree document (and all of its children recursively). Latest Version: 1.3 Released: 2021-09-16T18:30:00Z (UTC) Last Updated: 2023-11-15T18:30:00Z (UTC) 2.Blocks [image] [image] [image] [image] [image] [image] [image] [image] [image] 3.Documentation Events ErrorOccurred Event indicating error/excep…
Taifun
you still can read it using SAF
...and copy file to ASD as well.
Hello.
I'm trying to delete a file in /Documents.... It won't delete it...
Blocks are attached....
It is good?
Ondrej
You must use SAF to delete non-media files on Android 11 and above.
You must use SAF to delete non-media files on Android 11 and above
Yes, if and only if those non-media files are not created by the app itself (on Android 11+). The same applies to media files. If they are not crearted by the app you must use SAF to delete them on Android 11+.
The same applies to media files. If they are not crearted by the app you must use SAF to delete them on Android 11+.
So I should add another final detail to my Android Storage overwiew:
Hello.
Couldn't you find an example?
Ondrej
Couldn't you find an example?
An example of what?
Everything you need to know about your topic has already been said. If your sqlite file was not created by the same app (for whatever reason - reinstallation, previous testing with Companion etc) then you must use SAF to access that file (or request and grant MANAGE_EXTERNAL_STORAGE
).