File - readfrom filename dont work

I made an app that used File readfrom filename and it worked, now it doesn't work, can't find the file. The file is in path file:///storage/emulated/0/WhatsApp/Media/WhatsApp Documents. ???

1 Like
  1. With API30 you cannot (easily) save files to a folder outside of the ASD (application specific directory). If no other resources outside of your app require access to these files, then save to the ASD. You can create sub directories if required.
  2. There is a bug that prevents saving of files when there is a space in the file path, in your case: /WhatsApp Documents/
1 Like

see the overview here

outside of ASD and shared directories you only can read media files ...
Taifun

2 Likes

There is a bug that prevents saving of files when there is a space in the file path, in your case: /WhatsApp Documents/

What the path i can use?

I need only to read de file...

On Android 11+ you must use SAF or the app must grant MANAGE_EXTERNAL_STORAGE to access / read non-media files outside of the ASD or one of the Shared folders.

See also here: