I wish delete music file stored on my phone (has no SD card) in Music folder. I have file path and File.exists()
said true. Next, File.delete()
also said true, but file stay in its place. But! After "deletion" I can no longer play this file, edit name and also can't copy it. But I can delete it manually.
I've set android.permission.WRITE_EXTERNAL_STORAGE
. OS 4.4.4 GPE
Where is my mistake? Any suggestions, thanks.
File file = new File(Path);
if (file.exists()){
file.setWritable(true, false);
return file.delete();
}