DevsOnFlutter / file_manager

FileManager is a wonderful widget that allows you to manage files and folders, pick files and folders, and do a lot more. Designed to feel like part of the Flutter framework.
https://pub.dev/packages/file_manager
BSD 3-Clause "New" or "Revised" License
60 stars 17 forks source link

Some Directories return empty file list #22

Closed canewsin closed 1 year ago

canewsin commented 1 year ago

Describe the bug Some directories like /storage/emulated/0/Android/media/com.whatsapp/WhatsApp/Media/.Statuses/ shows Empty directory, even though device file manager shows file list.

To Reproduce Steps to reproduce the behavior:

  1. Run Example App
  2. Go to /storage/emulated/0/Android/media/com.whatsapp/WhatsApp/Media/.Statuses/
  3. You can see Empty Directory

Expected behavior Should show file list

flutter doctor -v

[√] Flutter (Channel stable, 3.3.4, on Microsoft Windows [Version 10.0.22000.1042], locale en-IN)
    • Flutter version 3.3.4 on channel stable at C:\flutter\1.0.0
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision eb6d86ee27 (5 weeks ago), 2022-10-04 22:31:45 -0700
    • Engine revision c08d7d5efc
    • Dart version 2.18.2
    • DevTools version 2.15.0

[√] Android toolchain - develop for Android devices (Android SDK version 31.0.0)
    • Android SDK at D:\Android\SDK
    • Platform android-33, build-tools 31.0.0
    • ANDROID_SDK_ROOT = D:\Android\SDK
    • Java binary at: C:\Program Files\Android\Android Studio\jre\bin\java
    • Java version OpenJDK Runtime Environment (build 11.0.12+7-b1504.28-7817840)
    • All Android licenses accepted.

[√] Chrome - develop for the web
    • Chrome at C:\Program Files\Google\Chrome\Application\chrome.exe

[√] Visual Studio - develop for Windows (Visual Studio Build Tools 2019 16.11.15)
    • Visual Studio at C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools
    • Visual Studio Build Tools 2019 version 16.11.32510.428
    • Windows 10 SDK version 10.0.18362.0

[√] Android Studio (version 2021.2)
    • Android Studio at C:\Program Files\Android\Android Studio
    • Flutter plugin can be installed from:
       https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
       https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 11.0.12+7-b1504.28-7817840)

[√] VS Code (version 1.73.1)
    • VS Code at C:\Users\PramUkesh\AppData\Local\Programs\Microsoft VS Code
    • Flutter extension version 3.52.0

[√] Connected device (4 available)
    • M2012K11I (mobile) • 192.168.0.108:38199 • android-arm64  • Android 12 (API 32)
    • Windows (desktop)  • windows             • windows-x64    • Microsoft Windows [Version 10.0.22000.1042]
    • Chrome (web)       • chrome              • web-javascript • Google Chrome 106.0.5249.119
    • Edge (web)         • edge                • web-javascript • Microsoft Edge 107.0.1418.26

[√] HTTP Host Availability
    • All required HTTP hosts are available

• No issues found!

Additional context Device OS: Android 12

4-alok commented 1 year ago

update and use the below code to get Files Access Permission

await FileManager.requestFilesAccessPermission();