Yes indeed. I refer to the links I provided earlier in this topic.
However, what do we learn from them?
I don't have android 11, I tested these apps on android 9 but it seems they don't work on android 9. App asks for permissions but files are not saved. So I still don't really know what's going on and what you're trying to convey in all these posts. Later I will test on android 10, if it makes sense?
These apps are only ONE app.
Did you test → saveTestFile_API29.apk
on your Android 9 device?
Then you should get this:
tested on a Galaxy Note8, Android 9.
But these AKPs are only built for testing on Android 11 (10+).
They infer that what I want to do is possible, that is to read non "media" files from a Documents or Downloads directory ( one of the shared dirs )
And again: No ...
Here are two nice short tutorials on scoped storage:
Saving Files in External / Scoped Storage (API 30+) - Android Studio Tutorial
@Anke, let me respectfully disagree...
as already said earlier
see also this Stackoverflow answer
You can ask the user to select a folder (which will be under the restricted public locations) and then you can programmatically access and check and files in this location. See Access documents and other files from shared storage | Android Developers
You can ask the user once and then store the permission they have given you to access files/folders with Access documents and other files from shared storage | Android Developers
Taifun
I had read all of this before. How about if you post
- the appropriate code (but I don't mean the code snippets from Google)
- if necessary an extension for this and
- an example so that we can test it?
I haven't found anything like it yet.
So how can that be put into practice?
Did you test this with a compiled app from the test-server?
How did you place the file in /Download in the first instance ?
yes apk, sdk 30.
call SaveFile and have scope-legacy
This only works if you create the file in/with the app. Not for files that are already there or come from another source/app....
How ReadFile TXT file, will maked from other app?
Only via pasting from clipboard in my app?
What do you want to tell us with these blocks?
What does you mean with "other no"?
Your blocks save / read in the ASD
for devices with API > 28.
Your blocks have nothing to do with → shared storage.
Note: The File
component still incorrectly requests READ
/ WRITE
permissions for the ASD
.
other folder not read/write , except Download
ASD work good
need ReadFile TXT file, maked from other app...
How work ImagePicker, FilePicker after picking...mmm)
I have no idea what you are talking about.
Anyway, of course it also works with other paths (folders), e.g.: /Downloads/test2.txt
.
Post a test aia.
Solved)
If Rename txt,htm to media file, as .jpg may Read Any file in any folder from FilePicker
Also Save
Yes, this is a nice idea and it seems to work.
"Also save" ... what ?