Quote:
Originally Posted by kaufman
I navigated to the SD card at storage/extSdCard and it doesn't show any directories there.
What is interesting, is that if I turn the option off, and so to the SD card folder, it will let me navigate up to the root folder. At that point, it does show me the folders.
|
Thanks for the feedback.
What you saw is consistent with what I read, specifically that Android 4.4+ lays its own file system over the SD card using FUSE (Filesystem in USEr space). Paraphrasing what I read, the SD card doesn't really exist unless it has been "mounted" (added to the OS) by Android. Traversing the path does not mount the SD card, but asking for the app-specific folders does mount it. The consequence is that you can't see the SD card unless something has asked for a user-specific folder. I would expect a rooted device to not have this problem, but I am not at all sure of that. Perhaps typing "/storage/extSdCard" into the box would do the trick because that would force Android to actually look at the card. Or perhaps not.
On the other hand, what you see doesn't jive with the rule that apps are supposed to be able to read files on SD cards. What I read implies that the read-only mounting happens when an app attempts to open a file. Perhaps I should change my code to attempt to open a folder for read before I attempt to walk it. It is times like this that I wish I had a kitkat device with an SD card so I could experiment. The Android emulator doesn't support second SD cards and neither does my N7.
I wish I could ignore this sort of BS and simply concentrate on app functionality.