Skip to content
Advertisement

Tag: android-storage

listFiles() returns null on /storage/emulated, while /storage/emulated/0 exists

I am testing on android 27 emulator and trying to traverse some directories. When I try to traverse /storage/emulated directory, the method listFiles() returns null while there /storage/emulated/0 exists. Here is a testing code: P.S. I have added the proper storage permission in manifest and granted the runtime permission. Answer Short answer: Android won’t grant your app a permission to

Advertisement