srajan
srajan

Reputation: 205

My android app not able to open directories to read files

I have a app written in python/kivy that i have signed and installed on my android phone. The filemanager , an instance of the MDFileManager opens the root dir (/) and displays the file system. But i am not able to open any directory in internal or external storage, so that i can select a file. Most of the directories have a small lock icon on them and those dirs wont open. The directories without lock icon do not have any files or the type of files i want. I browsed the directory using a terminal app and found that the ls command on a locked directory returns a permission denied error. This happens only with this app. I am able to open directories and chose files with other 3rd party apps as well as my own app, written in react native. So not sure if this is an issue with MDFIleManager or something else. Any advise/workaround is highly appreciated

Upvotes: 0

Views: 510

Answers (1)

Ali Sheikhpour
Ali Sheikhpour

Reputation: 11086

Viewing folders without accessing them is most likely due to not setting permissions. Add the following permissions in your manifest according to level of access:

  • READ_EXTERNAL_STORAGE
  • WRITE_EXTERNAL_STORAGE
  • MANAGE_EXTERNAL_STORAGE.

Upvotes: 1

Related Questions