Reputation: 55
imagedirectory = new File(path);
imagepool = imagedirectory.listFiles();
Uri targetdelete = Uri.fromFile(imagepool[photoindex]); //photoindex is integer 1
File filetodelete = new File(targetdelete);
boolean deleted = filetodelete.delete();
I am receiving an error in this line
File filetodelete = new File(targetdelete);
it says targetdelete must be a string object.... I thought it was valid to put Uri object as the agrument when initializing a File object?
Thanks once again, wonderful experts on stack overflow!!
Upvotes: 0
Views: 58