I made a child in Firebase Storage. the child has a user's image, and tweet image or something. when the user wants to delete his account, I have to delete all the information of the user. so, I want to delete the storage child at once. but it didn't work. how can I delete the child like a folder that has all the files of the user??
Asked
Active
Viewed 250 times
1
-
"*but it didn't work*" - what didn't work? Always show the code that isn't working the way you expect, so we can see what you're trying to do. – Doug Stevenson Jul 22 '20 at 16:28
1 Answers
0
You should place the delete function when the user clicks on delete account button.
desertRef.delete().addOnSuccessListener(new OnSuccessListener<Void>() {
@Override
public void onSuccess(Void aVoid) {
// File deleted successfully
}}).addOnFailureListener(new OnFailureListener() {
@Override
public void onFailure(@NonNull Exception exception) {
// Uh-oh, an error occurred!
}
});
For more information, you should see this article and this article.

Ryan M
- 18,333
- 31
- 67
- 74

Rajnish Sharma
- 390
- 2
- 14