开发者

Saving images in a HashMap Android

is it possible to save images from the MediaStore, based on a certa开发者_如何转开发in 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.


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜