hedzr / android-file-chooser

a lightweight file/folder chooser or picker
Apache License 2.0
284 stars 62 forks source link

Can't list SD card content at all #83

Open binhminh79 opened 4 years ago

binhminh79 commented 4 years ago

I run on virtual device API 26, the SD card content is not listed. please help.

hedzr commented 4 years ago

seems our FileUtil.getStoragePath() broken, I need more time to check it and others

hedzr commented 4 years ago

sorry to late reply.

About this issue, there are three points:

  1. FileUtil.getStoragePath() broken on some devices (virtual or physical). see also https://stackoverflow.com/questions/14796931/illegalargumentexception-in-statfs-in-webviewcore-internal-thread and more...
  2. In newer Android SDKs, external storage volume directory is non-readable and non-listable on some devices (most of emulators).
  3. afc library v1.2.0 has targetSDK >= 28, see also android-9.0-changes-28#per-app-selinux, this might disallow one app access the folders outside its scope.

It should be useful to downgrade to android-file-chooser v1.1.x.

sidtact commented 4 years ago

Any better solution on this?