Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.


  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • DownloadDownload
  • PrintPrint
Share this Page URL
Help

Part 2: Exercising the Android SDK > Storing and retrieving data

5. Storing and retrieving data

This chapter covers

  • Storing and retrieving data with SharedPreferences

  • Using the filesystem

  • Working with a SQLite database

  • Accessing and building a ContentProvider


Android provides several ways to store and share data, including access to the filesystem, a local relational database through SQLite, and a preferences system that allows you to store simple key/value pairs within applications. In this chapter, we’ll start with preferences and you’ll create a small sample application to exercise those concepts. From there, you’ll create another sample application to examine using the filesystem to store data, both internal to the application and external using the platform’s Secure Digital (SD) card support. You’ll also see how to create and access a database.


  

You are currently reading a PREVIEW of this book.

                                                                                        

Get instant access to over
$1 million worth of books and videos.

  

Start a Free Trial