Java tutorial
//package com.java2s; import android.content.Context; import java.io.File; public class Main { public static void deleteObject(Context context, String fileName) { String filePath = context.getFilesDir().getPath() + "/" + fileName; File file = new File(filePath); if (file.exists()) { file.delete(); } } }