8

My application requires that when a snapshot is taken it must store in memory and next time when I restart the phone I must get a thumbnail of that photo in list of photos and the full scale photo when I click on it.

There are 2 ways I know.

  1. Store images directly. Concern here is every time it has to hit directory to get image which takes some time.
  2. Store all images in single xml. Concern here is XML will be too big and takes time to parse

Which is more efficient ?

WarrenFaith
  • 57,492
  • 25
  • 134
  • 150
Prabhat
  • 2,261
  • 7
  • 46
  • 74

1 Answers1

5

Definitely store the images directly as opposed to in XML. It will take time to read the image from the file system but I wouldn't worry about this taking an excessively long time.

Read through the android docs on Data Storage for more info: http://d.android.com/guide/topics/data/data-storage.html

0x5C91
  • 3,360
  • 3
  • 31
  • 46
m6tt
  • 4,223
  • 1
  • 22
  • 20