Code example for Context

Methods: getPackageName

0
		if (Environment.getExternalStorageState().equals(
				Environment.MEDIA_MOUNTED)) {
			cache = new File(Environment.getExternalStorageDirectory()
					.getAbsolutePath()
					+ "/Android/data/" 
					+ ctx.getPackageName() + "/cache/");
		} 
		// Use internal storage 
		else { 
			cache = ctx.getCacheDir();
		} 
 
		// Create the cache directory if it doesn't exist 
		if (!cache.exists()) {
			cache.mkdirs();
		} 
 
		return cache.getAbsolutePath();
	} 
 
	/**