Open MianIbrarHussain opened 1 year ago
I also experienced the same issue when I used ExternalStorageDirectoryPath
but DocumentDirectoryPath
list all files and folders
Same thing happening for me as well directory files are excluded
Same thing happening for me as well directory files are excluded
I also faced same issues but figured it was not the issue of RNFS.readDir function but due to change in the way permissions are handled from android 11(API level 30). Android 11 introduced scoped storage, which restricts access to external storage and requires apps to use the MediaStore API or the Storage Access Framework (SAF) for accessing files. So, from Android 11, the READ_EXTERNAL_STORAGE permission is not required for accessing media files. Instead, you should use the READ_MEDIA_IMAGES, READ_MEDIA_VIDEO, or READ_MEDIA_AUDIO permissions, depending on the type of media you're accessing. Hope it helps, if it does then leave a thumbs up or if not then please mention the API level/Android version on which you are facing this issue then I will be able to help more.
Same issue , has anyone find any solution ,
mean while i'm using MediaStore API
Due to new policies you need to get special app access to read external storage for your app and you will be good to go...
On Thu, Jul 25, 2024, 21:11 Sujeet Kumar @.***> wrote:
Same issue , has anyone find any solution ,
mean while i'm using MediaStore API
— Reply to this email directly, view it on GitHub https://github.com/itinance/react-native-fs/issues/1208#issuecomment-2250840821, or unsubscribe https://github.com/notifications/unsubscribe-auth/AZOMJK2QUA4PQJXSDVL4H3TZOEPSLAVCNFSM6AAAAAA7AZOVZCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDENJQHA2DAOBSGE . You are receiving this because you authored the thread.Message ID: @.***>
In my case, react-native-external-storage-permission solved this issue.
And as Use of All files access (MANAGE_EXTERNAL_STORAGE) permission - Play Console Help said, "you will be required to declare this and any other high risk permissions using the Declaration Form in Play Console"
I have been using different libraries but none of them is fetching files all of them only return folders. I am working on file manager app for which access to all files in storage is necessary. If anyone could tell me why react-native-fs or react-native-blob-util only return folders and not files in them? If anybody have any suggestions I am all ears.