I am implementing an application which generates and create files in External storage. How can I remove that?
Edit
I added following code and still I am getting the same problem. See my code below:
String fullPath = "/mnt/sdcard/";
System.out.println(fullPath);
try{
File file = new File(fullPath, "audio.mp3");
if(file.exists()){
boolean result = file.delete();
System.out.println("Application able to delete the file and result is: " + result);
// file.delete();
}else{
System.out.println("Application doesn't able to delete the file");
}
}catch (Exception e){
Log.e("App", "Exception while deleting file " + e.getMessage());
}
In the LogCat I am getting Application able to delete the file and result is:false. I attached my screen shot after executing this.