What You Should Use

For data that your app needs, but that the user only needs through your app, use internal storage. This can include data that the user might consume with some other app, such as in the PDF FileProvider. With internal storage, your app needs to initiate giving the user the data, whether it is directly in your UI or by serving it up to other apps.

For data that the user will want independently of your app, use the Storage Access Framework, due to the long-term limitations of working with external and removable storage via the filesystem. External or removable storage should be limited to cases where you are using some third-party library that only accepts a File as input, or similar cases where you are unable to use a Uri from the Storage Access Framework.


Prev Table of Contents Next

This book is licensed under the Creative Commons Attribution-ShareAlike 4.0 International license.