Posts Tagged Android storage

Storing Objects in Android

One alternative to using SQLite on Android is to store Java objects in SharedPreferences. Here, we’ll look at two different ways to do that. Why not go for SQLite for all storage needs? The reasons can be varied: besides the impedance mismatch between object orientation and relational databases, SQLite might be overkill (brings more overhead) […]

, , , , , , , , ,

3 Comments

Android Persistence: External Storage (SD Card)

Of all the options for Android storage discussed previously, storing files externally on the phone’s SD card appears the least desirable option, for a number of reasons: There is a security issue as a (non-encrypted) file can be read by other applications There is an availability problem as the user can unmount  or remove the […]

,

Leave a comment

Android Persistence: Internal Storage

As Android developers, we have a few options for persisting our application data across runs: SQLite database external storage on the SD card, or through networking SharedPreferences (see previous article) or we can use the phone’s internal file system, and store data in files which are, by default, only visible to our application. Why would […]

, ,

7 Comments

Android Persistence: SharedPreferences

Android provides a number of options for persisting data, from using SQLite databases to internal or external storage on the SD card.  For primitive types however, there is a much simpler technique for saving data between user sessions called SharedPreferences, which provides persistent key-value pairs of primitive data types. A priori, we might think that, by […]

,

1 Comment