Introduction
Since almost any application, big or small, requires saving some kind of data, 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 expose the data through a Content Provider
- Cloud storage: Private server or Service Provider
There are benefits and tradeoffs to using internal and external storage. We will list some of the differences here to help you decide whether to use internal or external storage:
- 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)
- External storage...