0

Created an app that takes picture and uploads it to my pc. But I need to delete it from phone after it was uploaded.

File file = new File(String.valueOf(photoURI));
file.delete();

Tryed using that but it didn't helped me.

Full code: https://pastebin.com/mvdjRULa

1 Answers1

0

I see that you have member variable Uri photoURI only meant for deleting the file. Instead make photoFile member variable and call photoFile.delete() after you upload the file.

Deividas Strioga
  • 1,467
  • 16
  • 24