Rexx
Rexx

Reputation: 269

Saving images in a HashMap Android

is it possible to save images from the MediaStore, based on a certain user action, in a key/value pair using Hashmap. what i mean is, if the app gets restarted, does the Hashmap retain the contents or would i have to perform the action again.

what other solutions can i use to save the images for fast retrieval?.. shared Preferences or sqlite database, but i am assuming the latter might just be a waste.

Hope i am clear on this. Thank you.

Upvotes: 0

Views: 858

Answers (1)

Al Sutton
Al Sutton

Reputation: 3924

A HashMap would get destroyed when your application is destroyed & restarted.

One option would be to use your applications cache directory and define a mapping between your key and the filename in the cache folder.

Upvotes: 2

Related Questions