Hi guys
I have a Uri like "content://media/external/audio/media/149" that is a
audio file and i want to delete it
i have tried:
Uri fileUri = Uri.parse("content://media/external/audio/media/149");
c.getContentResolver().delete(fileUri, null, null);
I have also tried:
File fileToDelete = new File(new URI("content://media/external/audio/
media/149"));
fileToDelete.delete();
The file was created using the Sound recorder Intent. Actually, if I
create a MediaPlayer mp, I can set the source:
mp.setDataSource(QueryResults.this, Uri.parse(fileUri));
and then:
mp.prepare();
mp.start();
and the file is CORRECTLY played.
So if i want to delete the file i can't, why?, permision problems
maybe, because my app doesn't create the file..??
Thanks in advance.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---