Here you can find the source of getExternalCacheDir(Context context)
private static File getExternalCacheDir(Context context)
//package com.java2s; //License from project: Open Source License import java.io.File; import android.content.Context; import android.os.Build; import android.os.Environment; public class Main { private static File getExternalCacheDir(Context context) { if (hasExternalCacheDir()) { return context.getExternalCacheDir(); }/*from w w w .ja va 2 s . c o m*/ final String cacheDir = "/Android/data/" + context.getPackageName() + "/cache/"; return new File(Environment.getExternalStorageDirectory().getPath() + cacheDir); } private static boolean hasExternalCacheDir() { return Build.VERSION.SDK_INT >= Build.VERSION_CODES.FROYO; } }