9. Data Storage Methods
Complicated and robust Android applications often need to utilize some type of data storage. Depending on the situation, different data storage methods are available to the developer:
• Shared Preferences for lightweight usage, such as saving application settings and the user interface (UI) state
• A built-in SQLite database for more complicated usage, such as saving application records
• The standard Java flat file storage methods: InputFileStream
and OutputFileStream
.
These are discussed in this chapter. Also discussed is the Content Provider Android component that is used to share data between applications. It should be noted that another basic data storage method managed by the Android system, the onSaveInstanceState() ...
Get The Android Developer’s Cookbook: Building Applications with the Android SDK now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.