It is required to display all files and directories inside a specific directory. First, we have access to the phone's "/", then when trying to open and retrieve all directories from the "/ sdcard /" directories, the file.list () method returns null, although there are files in the folder. In addition to "/ sdcard /", which is external storage (phone memory), null is also returned when accessing the memory card (in my case it lies in "/ storage /". The resolution is written in the manifest:

<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/> 
  • Show your code. - Sergey Gornostaev
  • Dude, he has 8 classes in the program, which one? - Nick

0