Just use the delete method on your content resolver and pass it the URI of the image. The implementation of the content provider should delete the image and remove it from the list.
getContentResolver().delete(uri, null, null); Doug On Mar 29, 5:54 am, sourabh <[email protected]> wrote: > Hi, > > i am new in android > > when i take picture from my phone camera it will be stored in phone > gallery > > with the help of code i got the path "content:/media/external/images/ > media/22" > > i want to delete this image file on click button > > i am using the following code for deleting the image > > String selectedFilePath = "content:/media/external/images/media/22"; > > File file = new File(selectedFilePath); > > boolean deleted = file.delete(); > > but the file will not delete > > please help me out of this... i am waiting for your reply > > Thanks > Sourabh Zalani -- 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

