Choose internal storage and external storage

What is internal storage and external storage in Android? External micro SDcard storage and internal memory for storing memory? If I need to write a file for my application, these are only my applications (the user does not have work with this file), then where can I write my file - in internal or external memory?

I think if I write my file to SDcard (external memory), then when the user ejects the SD card, the application will not be able to read the file. It is right? If this is correct, then writing the file to external memory will not meet my criteria. Since my application needs to check some data in the file several times, and if at this particular moment the user ejects the SD card, my application will not be able to achieve its goal.

And I need to constantly write the file (but if the user uninstalls the application, the file must be deleted). So which way should I go?

+4
source share
4 answers

Use internal storage for your purpose (as a file or as a general privilege [key-value pair])

SD card is not an option to use.

Use the Android developer link that explains the various storage options: http://developer.android.com/guide/topics/data/data-storage.html

Cheers, Preeya

-1
source

Check out this blog post for the correct way to use file storage in Android .

If you need to have access to the file all the time, internal storage is the way to go. But you should not use large files in the internal storage, because many devices are very limited in storage space.

Files are deleted automatically on both external and internal storage when you use the built-in Android mechanisms to create files in the first place. This is also explained in the message.

+4
source

External micro SDcard storage and internal phone memory?

micro SDcard and internal phone memory, both of them are external storage in accordance with official Android documents.

If I need to write a file for my application, which is only my application (the user does not have work with this file), then where should I write my file - in internal memory or in external memory?

Save your files to internal storage.

And I need to constantly write the file (but if the user uninstalls the application, then the file should be deleted). So which way should I go?

Save your files to internal storage.

Why, since the Official Android Guide ,

By default, files stored in the internal storage are private for your application and other applications cannot access them (and the user). When a user uninstalls your application, these files are deleted.

Ways to save files to internal storage:

Both of them are in the Context class.

 File getDir (String name, int mode) File getFilesDir () 

But note that many low- end phones have limited internal memory . In phones of this type, even images shot using the camera are automatically saved on the SD card. You should take care of such cases.

The terminology of the internal and external storage according to Google / Android white papers is different from what we think.

+1
source

You should use the internal storage that your application has always accessed, and not other access access.

I think you need to go through the internal storage area.

thanks

0
source

All Articles