Permissions to /storage/emulated/0/Documents/

The first time I run the app on my mobile, Android stops me with a request: "Allow the Knihy app to access photos, videos, music and audio on this device?" .... The Knihy application only needs access to: /storage/emulated/0/Documents/. Is it somehow possible to arrange it directly in the app, without user intervention?
Ondrej

Well thank you.
Ondrej

It's not clear, did you make this app ? please show your blocks

I have created an apk application. At startup, I check if it is the first startup on the device, so I test if there is a /Documents/Backup folder and a dbknihy.sqlite file in it. If it is not there, then it is the first run on the device and I copy dbKnihy.sqlite from ASSETS to ASD.....
Here are some first blocks......
Ondrej






On Android 11+, storage permissions (here specifically WRITE, because there is no WRITE perm. on Android 11+) shouldn't be required at all (in your case). On Android < 11, storage permissions must be granted manually by the user. In this respect, it is not possible to do this without user participation.

To avoid storage permissions on Android 11+ try the TaifunFile or FileTools extension instead of the File component.

Well thank you!
Ondrej

Hello.
I'm trying to make a copy of a file from ASD to /Documents via Companion... I'm using TaifunFile1. It doesn't work for me... Where am I doing wrong?
Android 13.
Ondrej

Hello.
Can anyone help?
I have Android 13.
I have a file dbKnihy.sqlite in ASD.
I copy it to the folder: /Documents/Backups/.
When I do it via Companion, it's OK - /Documents/Zalohy/dbKnihy.sqlite is created.
If I do it via .apk, the file is copied only to /Documents/ and has the form Zalohy_dbKnihy.sqlite.
Where am I doing wrong?

Ondrej

blocks(12)


I apologise:
There should be a folder: I copy it to the folder /Documents/Zalohy

Ondrej

I've explained the Companion & APK issues related to access issues to non-media files created by the app itself often enough on the forum. Last e.g. today here:

Thanks.
It already works. Absolute path to db is required in .apk.
Ondrej