I made a small project and added an image for the Firebase storage to appear in the application, but when I moved to another fragment , it would downloaded the same image every time, but rather I want to take a copy in the RAM
storageReference = FirebaseStorage.getInstance().getReference();
storageReference.child("cat.png").getDownloadUrl().addOnCompleteListener(new OnCompleteListener<Uri>() {
@Override
public void onComplete(@NonNull Task<Uri> task) {
if (task.isSuccessful()){
String url = task.getResult().toString();
Picasso.get().load(url).into(image);
}
}
});