77.7 Deleting a File
Whether a file can be deleted from storage depends on whether or not the file’s document provider supports deletion of the file. Assuming deletion is permitted, it may be performed on a designated Uri as follows:
if (DocumentsContract.deleteDocument(contentResolver, uri))
// Deletion was successful
else
// Deletion failed