I am building a app which lists all files from The Downloads folder of the user's device.
But, I am wondering that how do I get access to all the files of the Downloads directory on Android 11.
Since Android 11 has introduced Scoped Storage and SAF, it is not possible to get access to all folders through the READ_EXTERNAL_STORAGE permission. It is not even possible through Storage Access Framework's ACTION_OPEN_DOCUMENT_TREE since it does not allow user to grant access to the whole Downloads directory.
I have tried using MANAGE_EXTERNAL_STORAGE permission and it worked perfectly fine but Google Play rejected my app stating that this feature is not a core feature. So, I can't use this permission either.
My app is working perfectly fine till Android 10 since I declared the flag requestLegacyExternalStorage to true. But, I want my app to work in Android 11 and beyond.
Is there is any other way to access all files of the Downloads folder in Android 11 ?