内部缓存
getContext().getCacheDir()
/data/data/com.android.xxx/或
/data/user/0/com.android.xxx/
用于存放sp,数据库等;
外部缓存
getContext().getExternalCacheDir()
/storage/emulated/0/Android/data/com.android.dazhihui/
用于存放应用log日志,配置文件等;
权限
Android7开始,无法通过路径访问另一应用的内部缓存,可以访问外部缓存;
Android11开始,无法通过路径访问另一应用的内部缓存和外部缓存。