Here you can find the source of getExternalCacheDir(Context context)
private static String getExternalCacheDir(Context context)
//package com.java2s; //License from project: Apache License import java.io.File; import android.content.Context; import android.os.Build; import android.os.Environment; public class Main { private static String getExternalCacheDir(Context context) { if (hasExternalCacheDir()) { return context.getExternalCacheDir().getPath() + File.separator + "gesture"; }//ww w. j av a2 s . c om final String cacheDir = "/Android/data/" + context.getPackageName() + "/cache/gesture/"; return Environment.getExternalStorageDirectory().getPath() + cacheDir; } private static boolean hasExternalCacheDir() { return Build.VERSION.SDK_INT >= Build.VERSION_CODES.FROYO; } }