DONG NAI UNIVERSITY OF TECHNOLOGY
1
5. Content Provider
4. SQLite
3. Shared Preferences
2. XML Parser
1. Files
DONG NAI UNIVERSITY OF TECHNOLOGY
2
Ø Uses the same file constructions found in a typical
Java application
Ø Files can be stored in the device’s (small) main
memory or in the much larger SD card.
Ø Files stored in the device’s memory, stay together
with other application’s resources (such as icons,
pictures, music, ). We will call this type: Resource
Files.
qAndroid Files
DONG NAI UNIVERSITY OF TECHNOLOGY
3
qData storage options
Ø Shared Preferences Store private primitive data in
key-value pairs.
Ø Internal Storage Store private data on the device’s
memory.
Ø External Storage Store public data on the shared
external storage.
Ø SQLite Databases Store structured data in a
private/public database.
Ø Network Connection Store data on the web with
your own network server.
DONG NAI UNIVERSITY OF TECHNOLOGY
4
1. Files
1.1 Internal Storage
1.2 External Storage
1.3 Saving Cache files
DONG NAI UNIVERSITY OF TECHNOLOGY
5
1.1 Internal Storage
Reading Resource File : Everything in the apk will be read
only. And it's even better: android doesn't extract the apk
when you install a program, so the size consumed is kept to
minimal.