Android getFielsDir() vs getDir() - What do I use to save files in my apps
private data?
I understand this question is very similar: What is the difference between
getDir and getFilesDir on Android?
but, I'm still not sure what to use when I simply want to save my files in
my private data. For a directory should I just use
data/data/com.test.myapp? That will make it private to my application?
getFilesDir()
Gets the absolute path to the filesystem directory where your internal
files are saved.
getDir()
Creates (or opens an existing) directory within your internal storage space.
I've also tried reading through some of the commonsware open source
projects, but I guess I just get even more confused about the whole
getExternalFilesDir() because doesn't Android refer to internal storage
(non-sdcard) as "external" storage after a certain api level?
No comments:
Post a Comment