msimonides / homerplayer

An audio book player for the elderly and visually impaired
https://msimonides.github.io/homerplayer/
MIT License
37 stars 19 forks source link

SD card not detected on some devices #13

Closed msimonides closed 7 years ago

msimonides commented 7 years ago

On some devices Homer Player doesn't list audiobooks that are stored on an SD card.

msimonides commented 7 years ago

Currently Context.getExternalFilesDirs() is used to list available storage devices. In the Android world removable media may either be treated as "semi-permanent", i.e. not easily reachable (e.g. an SD card slot hidden under a removable back panel) or portable, i.e. easy to attach or detach on the outside of the device. Applications should only store thier data on semi-permanent media (which makes sense). Therefore the Context.getExternalFilesDirs() ignores temporary, or portable, media in its output. And this seems to the reason for this issue: on some devices the SD card slot is treated as semi-permanent, on others not.

Source: https://source.android.com/devices/storage/traditional.html#multiple-external-storage-devices