Godfryd
Godfryd

Reputation: 479

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?

Upvotes: 0

Views: 685

Answers (1)

Alex Shutov
Alex Shutov

Reputation: 3282

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

Upvotes: 0

Related Questions