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.
source share