getCachePath

public static String getCachePath(Context context)

Gets the cache storage path, e.g. /sdcard/Android/data/<package name>/cache

Return

full directory path, or empty string "" if external storage is not mounted or other error occurs

Parameters

context

Context


public static String getCachePath(Context context, String dir)

Gets the cache storage path, e.g. /sdcard/Android/data/<package name>/cache/<dir>

Return

full directory path, or empty string "" if external storage is not mounted or other error occurs

Parameters

context

Context

dir

custom directory name