Some basics on Android storage system

correct, see also the documentation Storage

which Android version are you using for your tests?
any screenshot of your relevant blocks?
how did you test? using the companion app? using the apk file? try again using the apk file...

Taifun

Yes, that would really be strange. But this is not the case, I'm sure.
Post your blocks and the aia (or a test aia). Also mention the Android version you're testing on and whether it's with Companion or the APK.

Sorry, i realise that the aia file i shared in my post had to many blocks to understant what happen.
so you will find here a very simplest one.
shared_File.aia (34,0 Ko)

fisrt button to save file in shared (directly in emulated/0)
second one to check file exist
and third one to read it.

when I test it, file is saved and i can check it, but when i try to read it app bugs ans stops.
same in companion or with apk

I can see and open it with my file manager:

Android version: 10 QKQ1.191014.001 on redmi 7A

There are some bugs with the File comp. Try with FileScope = Legacy instead of Shared.

As I said, with Legacy I can write and read the file but without been able to see it with file manager...
So i'm interested with Shared and possibility to have my file in emulated/0/.
But i think it'is strange to be able to write a file where we can't read it (in external SD it seems we can read but not write) it becomes difficult to undertand any logic !

Your tst.txt file is not in a shared folder, then you can not read write without this

You probably cited the wrong message.. in fact also my msg started eith "sorry.. " but my txt cvs file actually was in Download and file not worked with the apk..
However i happyly solved with the saf extension.

His device has Android 10 and there you can write/read to/from the root dir of the ext. storage with storage permissions (and also to any other locations exept the ASD of other apps & the MicroSDcard).

I have try this
image
but permission is not in label2 so i have no pemission1.SdkVersion>30...

but here i can't read in shared...

We won't get any further like this.
Post the aia (or rather a simple test aia) and the blocks.

is this not simple enougth ?
it just write check and read the file ! I don't know how do simplest...

Try this one:
shared_File_2.aia (34.2 KB)

It will not work on Android 11+ because of the known bug of the File comp. regarding storage permissions. Use instead my MFile ext.

well...it works fine, but i have to say that i'm surprised :
file is saved in shared (which is emulated/0) and it is read in Legacy !
how strange is it !
I just can thank you again (and lot) for your help, but i'm disappointed because i don't understand...

There is nothing to understand. It's just another bug (often mentioned by me). And there are some with the File comp.

For more details on this, read here:

Well... i have read so many posts on storage that i am completly confused !
This point is particulary complicated in Android: it depends on the version on the scope, if you use / // or no /, each time it use a différent path and possibilities (read,write, permissions...)

for my mind this type of presentation find in your last link is the more readable to understand and memorise all informations:
image
unfortunatly it is a first try and not all informations i talked are in...
maybe we need one for each android version.
I will try to build such a table, but for now i'm afraid to not have enougth informations, not have a good understanding about all of this and i'm too confused...

1 Like

and now your goal is to confuse everyone?
in your screenshots you are using the file component, now you are talking about blank images? the purpose of the file component is to work with text files!
your table does not help anyone...
if there are any doubts, then why not providing a screenshot of some relevant blocks... also tell us what you are expecting and what happens instead

Taifun

1 Like

? why are you talking about blank image ?
it is not the same for other files ?
maybe i missunderstood..sorry.

oh year ! that's it ! very clear!
just missing behaviour in removable SD card.

And I did:

A post was split to a new topic: Looking for a solution to record information I get from my device with ESP32