maxsap maxsap - 1 year ago 77
Android Question

How to delete internal storage file in android?

I have used the Android internal storage to save a file for my application (using

openFileOutput
) but I would like to delete that file, is it possible and how?

Answer Source
File dir = getFilesDir();
File file = new File(dir, "my_filename");
boolean deleted = file.delete();