Problem description: I wanted a “delete” function which could perform delete/remove of the selected entry in a listview and at the same time delete the residing video file string in the Video_List directory then it refresh the content of the listview?
I’m rather new in android/java can someone help me with it? Do scroll down to evaluate the problem i’m facing please!! Can someone tell me what is the specific code i should add into my current codes to perform the above mention function??
Since you have stored your selection into "item" object then in deleteFile() method you need to retreive the file path from that object, for that to work add the line:
in getVideoFiles() method ‘for’ loop.
also before onCreate state:
then in getVideoFiles at the end state:
finally in deleteFile() you need to state:
and that should work!