CopyPastor

Detecting plagiarism made easy.

Score: 0.7853121757507324; Reported for: String similarity Open both answers

Possible Plagiarism

Plagiarized on 2019-01-28
by Amas

Original Post

Original - Posted on 2017-03-25
by Michael Vescovo



            
Present in both answers; Present only in the new answer; Present only in the old answer;

clearly you are not deleting image: you can delete from Firebase Storage using
StorageReference photoRef = mFirebaseStorage.getReferenceFromUrl(mImageUrl); photoRef.delete().addOnSuccessListener(new OnSuccessListener<Void>() { @Override public void onSuccess(Void aVoid) { // File deleted successfully Log.d(TAG, "onSuccess: deleted file"); } }).addOnFailureListener(new OnFailureListener() { @Override public void onFailure(@NonNull Exception exception) { // Uh-oh, an error occurred! Log.d(TAG, "onFailure: did not delete file"); } });
Use it exactly where you delete that image from view
You need to use this method call:
StorageReference photoRef = mFirebaseStorage.getReferenceFromUrl(mImageUrl);
Then delete as you were:
photoRef.delete().addOnSuccessListener(new OnSuccessListener<Void>() { @Override public void onSuccess(Void aVoid) { // File deleted successfully Log.d(TAG, "onSuccess: deleted file"); } }).addOnFailureListener(new OnFailureListener() { @Override public void onFailure(@NonNull Exception exception) { // Uh-oh, an error occurred! Log.d(TAG, "onFailure: did not delete file"); } });

        
Present in both answers; Present only in the new answer; Present only in the old answer;