Godfryd Godfryd - 15 days ago 7
Android Question

Deleting file from internal storage in Android

I was saving file to internal storage now I want to delete it. The problem is, I don't remember the name of that file so I can't use this

myContext.deleteFile(fileName);
approach. How to get the name of that file and delete it?

Answer

When you use file methods from Context, Android saves that file into app's directory (and encrypt it, compared to File.()) method). So, you can just clear app data and that file will be removed