Android 11+ Restrictions
Since the beginning, the Storage Access Framework has been billed as the way for the app to get access to whatever content the user wants to work with.
In Android 11+, that is no longer the case, as the OS will prevent the user from accessing the user’s content in scenarios that Google does not like.
Principally, this affects ACTION_OPEN_DOCUMENT_TREE
, preventing the user from selecting:
- The root of external storage
- The
Download/
directory - Any subdirectories off of the
Android/
directory on external or removable storage
ACTION_OPEN_DOCUMENT
and ACTION_CREATE_DOCUMENT
share that last restriction of ACTION_OPEN_DOCUMENT_TREE
. Otherwise, these actions seem unaffected. Unfortunately, that ACTION_OPEN_DOCUMENT
limitation means that an app’s files are inaccessible by the user except through that app or by copying the files elsewhere using a device-supplied file manager.
Prev Table of Contents Next
This book is licensed under the Creative Commons Attribution-ShareAlike 4.0 International license.