You need the WRITE_EXTERNAL_STORAGE permission. With that, your app can delete any file it wants on external storage. Note, though, that /sdcard/download is almost assuredly wrong, as /sdcard is only used on a few percent of Android devices nowadays. Please use the appropriate static methods on the Environment class to get the directory to use.
On Thu, Jan 5, 2012 at 4:13 PM, ole! <[email protected]> wrote: > How can you delete a file created by another application? > > Situation: > 1. Application initiates browser activity > 2. Browser activity downloads a file into /sdcard/download > 2. Application reads file > 3. Application tries to delete file using File.delete() > 4. delete fails > > Examples of apps that can accomplish this: > FileManager apps (eg.ASTRO) > > > -- > 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 -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy Warescription: Three Android Books, Plus Updates, One Low Price! -- 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

