0

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.

2
  • When you say "no option of external memory" does that mean that saving them to SD Card is out of the question, right?
    – Matt
    Jan 23, 2012 at 5:52
  • Yes in my application I am not rely on any external memory, so I used only internal memory, so for this for application which is best way to store images in DB or in internal memory. Jan 23, 2012 at 5:55

2 Answers 2

1

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 ".nomedia".

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

1
  • Thanks akkilis for your knowledgeable reply, but as per requirement I am not able to use external memory. So I just want know storing image in internal memory is good or store it on DB with other records. Jan 23, 2012 at 11:21
1

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.

1
  • Hi VoteBrian, Yes I agree that there is various option to store data thats why I am asking which one is better for apps. I have two options either DB or Internal memory so which one is better. Jan 23, 2012 at 11:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.