How to delete internal storage file in android?

Viewed 111173

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?

8 Answers

Another alternative in Kotlin

val file: File = context.getFileStreamPath("file_name")
val deleted: Boolean = file.delete()
Related