Intro To Android (Workbook 2)

Storing Data

Java File I/O

You have all the standard Java I/O functionality. Android gives you some methods to find where you should store your files. You have access to internal and external storage options.

getFilesDir()

File storage directory available from the Context.

getCacheDir()

Caching directory available from the Context.

SharedPreferences

This is a key value store that stores primitive data types. It's a good lightweight storage system not only limited to storing things like the users favorite ring tone.

SQLite

Android has a bundled implementation that allows you to do standard CRUD operations. We will store our Locations and Delicacies using these facilities. See the lab for more information.