Efficient way to store images in Android

My application requires that when taking a snapshot it must be stored in memory, and the next time I restart the phone, I should get a thumbnail of this photo in the list of photos and a full-size photo when I click on it.

There are two ways to find out.

  • Save images directly. The concern is here every time it has to delete a directory to get an image that takes some time.
  • Save all images in one xml. The XML concern here will be too large and takes time to parse

Which is more efficient?

+6
android image storage
source share
1 answer

Definitely store images directly, not in XML. It will take time to read the image from the file system, but I would not worry about it, taking up too much time.

Read the Android docs in the data warehouse for more information: http://d.android.com/guide/topics/data/data-storage.html

+4
source share

All Articles