0

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);
        }

    }
});
Frank van Puffelen
  • 499,950
  • 69
  • 739
  • 734
Kimoo
  • 1
  • 1

0 Answers0