Skip to content

Instantly share code, notes, and snippets.

@tomo0611
Last active November 7, 2017 07:18
Show Gist options
  • Save tomo0611/203cede137130cab39857cb6809ee7b7 to your computer and use it in GitHub Desktop.
Save tomo0611/203cede137130cab39857cb6809ee7b7 to your computer and use it in GitHub Desktop.
AndroidでのEnvironmentの使い方と返り値

Environment.getDataDirectory().getPath() /data
Environment.getDownloadCacheDirectory().getPath() /data/cache
Environment.getExternalStorageDirectory().getPath() /storage/emulated/0
Environment.getRootDirectory().getPath() /system
Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_PICTURES).getPath() /storage/emulated/0/Pictures

this.getCacheDir().getPath() /data/user/0/jp.kaoru.picasaapi/cache
this.getExternalCacheDir().getPath() /storage/emulated/0/Android/data/jp.kaoru.picasaapi/cache
this.getFilesDir().getPath() /data/user/0/jp.kaoru.picasaapi/files
this.getObbDir().getPath() /storage/emulated/0/Android/obb/jp.kaoru.picasaapi

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment