Accessing downloads files on Android 11 returns no files

Viewed 23

So, I am trying to read the files from the shared Download folder on my Android 11 device, using the file class(in Kotlin):

val downloads = File("/storage/emulated/0/Download")

But when I call the .list() function to see all the subdirectories and files, only the subdirs appear: "downloaded_rom", "Filemail", "downloaded_apex"... I know MediaStore won't work for this purpose, and the SAF prompts the user to choose a directory, but that would be a headache for him and for me, too.. So is there a way to achieve what I need??

1 Answers
Related