External and internal memory. What will i use?

I use LazyList to upload images. It uses external storage, which is not the case. But in order not to show these files to everyone with a file browser in my hand, I thought to use internal memory instead, the maximum amount of memory for this is (5 mb).

What should I do? Are there any other options?

+1
android memory-management lazylist
source share
4 answers

AFAIK there are no internal memory limits for each application. But, the truth is that this memory usually does not work if users have many applications on the device, so you should not use it for large (or many) files.

I would go with external memory (sd-card), and if the original image access was a problem, then I would:

  • Encrypt file. It is hard and it will slow down the work.
  • Scramble the file. This includes moving around bytes, for example. moving the first 1000 bytes to the end of the file, etc. You can create your own version of InputStream that does the byte shuffling, and pass it to BitmapFactory.decodeStream(..) .
+3
source share

Internal memory should be used for small things that you do not want anyone to intervene. External memory (usually an SD card) may be available to other applications and the user. As a side note, internal memory is expensive, and users tend to uninstall applications that consume a lot of internal memory.

With external memory, just make sure you check that it is really available. An SD card may be missing, popped, mounted, or may not even exist (not all Android devices have one).

Access speed varies. I know that some Samsung devices have rather slow external storage, and their internal storage is very fast.

An alternative would be to download images from the network. It will also allow you to control them if you need to change them in the future. Their use on Amazon S3 will cost a few cents per month.

+2
source share

If you do not want everyone with a file browser to see your files, you can make a folder with a dot before it looks like this: "/sdcard/.hidden" But if they switch the display of hidden files and folders, you are less fortunate.

heres link to android data storage page

Hope this helps

+1
source share

Just a footnote (I don't have enough reputation to add a comment). @WinOrWin, obviously, the thread you're talking about is talking about “memory”, RAM, while this thread is talking about “memory space” (although conversationally, people can refer to it as “internal / external memory”). This is not the same thing. (for example, the main difference between hard disk space and memory).

+1
source share

All Articles