I am implementing an application that creates and creates files in external storage. Can you guys help me, how can we remove this?
Thanks Chandra
Edit-1: I added the following code, and still I have the same problem. Please take a look at 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);
}
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 LogCat, I get an application that can delete a file, and the result is false . I attached my screenshot after doing this. Please study this. And offer me.
source
share