Relative Content

Tag Archive for androidio

Why does Uri tree permission expire despite the GRANT_PERSISTABLE_URI_PERMISSION intent flag?

I am trying to make a file tree with DrawerLayout and NaviagtionView. The NavigationView’s Menu is populated by the method below, which is initialy called on the directory provided by the user via Intent.ACTION_OPEN_DOCUMENT_TREE with FLAG_GRANT_READ_URI_PERMISSION, FLAG_GRANT_WRITE_URI_PERMISSION, FLAG_GRANT_PREFIX_URI_PERMISSION and FLAG_GRANT_PERSISTABLE_URI_PERMISSION intent flags set.