简体   繁体   中英

Which one is preferable to store images in android?

In my application I am generating some images which are only needed to my application but it should persist in the phone permanently.

To do this I have two ideas:

  1. Store in a separate folder in sdcard and hide this and maintain a database with imageIDs and imagepaths.
  2. Store the images itself along with their IDs in the database.

Out of those two which one is better? Is there any other solution that is better with respect to the performance and storage space? If yes, then please suggest a good solution.

Thanks in advance.

The first one..

1: Store in a separate folder in sdcard and hide this and mentain a database with imageIDs and imagepaths.

is better to avoid large database file and conversion of blob type to image and vice-versa..

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM