美文网首页
Context获取路径

Context获取路径

作者: 一个简单搬运工 | 来源:发表于2018-01-09 21:55 被阅读99次

Environment.getDataDirectory().getPath(): /data

Environment.getDownloadCacheDirectory().getPath()  : /cache

Environment.getExternalStorageDirectory().getPath(): /mnt/sdcard

Environment.getRootDirectory().getPath()           : /system

Context.getCacheDir().getPath()                    : /data/data/com.zhd/cache

Context.getExternalCacheDir().getPath()            : /mnt/sdcard/Android/data/com.zhd/cache

Context.getFilesDir().getPath()                    : /data/data/com.zhd/files

Context.getObbDir().getPath()                      : /mnt/sdcard/Android/obb/com.zhd

Context.getPackageName()                           : com.zhd

Context.getPackageCodePath()                       : /data/app/com.zhd-1.apk

Context.getPackageResourcePath()                   : /data/app/com.zhd-1.apk

相关文章

网友评论

      本文标题:Context获取路径

      本文链接:https://www.haomeiwen.com/subject/zdxawxtx.html