简体   繁体   中英

In android image store in internal memory or DB. Which is most efficient way.

I want to store images locally, So which is efficient way , storing image in data base or storing image in internal memory. I have no option of external memory.

Best wud be to pre bundle the images in your apk itself. Else there is no way to do that.
Also if you can save images on the sd card, you can make the folder names start with "." (dot) so that they wont be visible in normal condition (will be visible only if there is option checked of "show hidden files" in your file browser of phone).
And if you want that your images dont show up in gallery then just add an empty file to the folder named . 的文件夹中。

This will make your images not to shpw up in Android Gallery.

This page shows the various options you have for data storage. If you just need to save images, I can't see why you would use a database. Also, your database would be located in Internal memory.

Images stored in private internal memory do not show up in the gallery as they are only accessible to the app that created them.

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