O'Reilly logo

The Android Developer’s Cookbook: Building Applications with the Android SDK by Nelson To, James Steele

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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() ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required