READ_EXTERNAL_STORAGE… permissions on Android 13+

Hi there,i have a problem with read_external_storage ,please if any one has a solution.


What exactly is your problem?
Probably you wanted to write READ_EXTERNAL_STORAGE instead of WRITE_EXTERNAL_STORAGE?

Taifun

i have a problem just with the reading files ,I can save it normally but cannot read it

Show us a screenshot of your relevant blocks
Are you trying to read a text file? From where? Shared storage, ASD or assets? How did you set the file scope? Which error message do you get?
Taifun

Notfor4.aia (10.7 KB)


Please answwe the questions

What happens if you press Button1?

It looks like you are trying to read a text file from ASD.
Use a relative path relative to ASD
To read a text file from ASD you do NOT have to ask for any permissions
Your correct filename seems to be /Me/notme.txt

Taifun

1 Like

Try a Do it here

The MakeDirectory block seems to return False
Can you confirm that?

Taifun

its works thank you so much

what exactly works?
please provide a screenshot of your working blocks

Taifun

The File component needs (uses) relative paths. With FileScope=App the path is relative to the ASD, so put there just the fileName. With FileScope=Legacy or Shared the path is relative to the root dir of the external storage.


grafik

The File.ReadFrom method should work (for FileScope=App) with only the fileName (without a starting slash).

1 Like

Sorry for responding late, i use /Me/notme.txt and it works

I appreciate your help, i have another problem I am trying to record a sound with (a sound recorder) and then encode that sound to String by the extension Filey, and that normally works After that I decode the result of the encoded file (String) to file and save it to the path /storage/emulated/0/Android/com.example.ouam/files/ MyDocuments/Recordings/record21.3gp but not working


image
image
image

Is your current problem (topic) solved? If so, mark the best answer as the solution. For another question regarding the SoundRecorder, please open a new topic.

ok i did it please check if