Last active
February 17, 2016 22:21
-
-
Save milosjovac/f205bcd1fa87df205d14 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// PRIVATE - no need for permissions here | |
// private dir in internal storage: | |
Context.getFilesDir(); // system doesn't clean this memory, put sensitive user data here. Not even user can read this files | |
Context.getCacheDir(); // system will clear this when low on memory | |
// (app specific) private dir in "external"(readable by all apps with READ/WRITE_EXTERNAL_STORAGE_PERMISSION) storage | |
Context.getExternalFilesDir(); | |
Context.getExternalFilesDirs(); // plural! As of KitKat it returns "external" directory folder, but also one from the SD card | |
Context.getExternalCacheDir(); | |
Context.getExternalCacheDirs(); // same here | |
Context.getExternalMediaDirs(); // added in Lollipop, add here files you want to be read by medi scanner | |
// for game developers and in purpose of expension files | |
obb directory // shared across all users | |
// PUBLIC - survives app being uninstalled | |
// not deleted when "Cleare data and clear cache" is cleared in Settings | |
// (user specific) public user dir in "external" storage directory | |
Environment.getExterenalStorageDirectory() // root, kao C:\ | |
Environment.getExterenalStoragePublicDirectory(String) // | |
Should I need the storage permission? http://prntscr.com/8wvabi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment