Introduction
Since most applications, big or small, require saving data – from default user selections to user accounts – Android offers many options. From saving a simple value to creating full databases using SQLite, storage options include the following:
- Shared preferences: Simple name/value pairs
- Internal storage: Data files in private storage
- External storage: Data files in private or public storage
- SQLite database: Private data (can be made public through a Content Provider)
- Cloud storage: Private server or service provider
There are benefits and trade-offs to using internal and external storage. We will list some of the differences here to help you decide which option best fits your needs:
Internal storage:
- Unlike external storage, internal storage is always available but generally has less free space
- Files are not accessible to the user (unless the device has root access)
- Files are automatically deleted when your app is uninstalled (or with the
Clear Cache
/Cleanup File
option in the App Manager...