1
2
3
4
5
6
7
8
9
10
11
12
13
|
File cacheDir = mContext.getExternalCacheDir();
if
(
null
!= cacheDir){
mCacheDirPath = cacheDir.getAbsolutePath() +
"/images/"
;
}
if
(TextUtils.isEmpty(mCacheDirPath)){
if
(Environment.MEDIA_MOUNTED.equals(Environment.getExternalStorageState())){
mCacheDirPath = Environment.getExternalStorageDirectory().getPath() +
"/Android/data/com.meiyaapp.meiya/cache/images/"
;
}
else
{
Toast.makeText(mContext,
"SD卡状态错误,请调整后重试哦。"
,Toast.LENGTH_SHORT).show();
}
}
|
本文转自 glblong 51CTO博客,原文链接:http://blog.51cto.com/glblong/1699245,如需转载请自行联系原作者