Extending the Opt-Out
Android 11 also offers android:preserveLegacyExternalStorage="true"
. This says:
- For users who upgrade the app, opt out of scoped storage
- For users who freshly install the app, use scoped storage as normal
There is no timetable given for if and when android:preserveLegacyExternalStorage
might no longer be honored, though the documentation states:
Note that this may not always be respected due to policy or backwards compatibility reasons.
Also, it means that different users of the same app version will get different storage behavior, depending on how the user got that app version (fresh install vs. upgrade).
And, of course, since this is new to Android 11, this should have no effect on Android 10 devices.
Given all of that, this seems like an attribute to avoid.
Prev Table of Contents Next
This book is licensed under the Creative Commons Attribution-ShareAlike 4.0 International license.