Java tutorial
//package com.java2s; import java.io.File; import android.os.Environment; public class Main { public static void deleteFile(File file) { if (Environment.getExternalStorageState().equals(Environment.MEDIA_MOUNTED)) { if (file.exists()) { if (file.isFile()) { file.delete(); } file.delete(); } } } }