Java tutorial
//package com.java2s; import android.app.Activity; import java.io.File; public class Main { public static void clearTemp(Activity activity) { File folder = new File(activity.getExternalFilesDir(null), "temp"); if (null != folder.listFiles()) { for (File file : folder.listFiles()) { file.delete(); } } } }