file=context.getFilesDir()
// /data/data/package_name/files

file=Environment.getDataDirectory();
// /data

file=Environment.getDownloadCacheDirectory();
// /cache

file=Environment.getExternalStorageDirectory();
// /mnt/sdcard

file=Environment.getRootDirectory();
// /system

// SD を抜くと、getExternalFilesDir() は null ?
file = getApplicationContext.getExternalFilesDir();
// mnt/sdcard/Android/data/package_name/files
// アンインストール時に削除される

// shared preferece folder
File f = c.getFilesDir();
File p = f.getParentFile();
path = p.getAbsolutePath() + “/shared_prefs”;
// /data/data/package_name/shared_prefs

// database folder
File f = c.getFilesDir();
File p = f.getParentFile();
path = p.getAbsolutePath() + “/databases”;
// /data/data/package_name/databases

Leave a Reply

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

(required)

(required)

© 2024 Falco Tech Blog Suffusion theme by Sayontan Sinha