Hello, I need to cache images on my application an...
# android
c
Hello, I need to cache images on my application and I was wondering what is the best way to do that. The application have to cache the images and load them if I don’t have internet and even if I close and open the app again. I saw some articles using Glide or Picasso, but I’m using Jetpack Compose so I think these frameworks won’t work properly. So I was trying to use DiskLruCache but is kinda complicate to understand how it works. Does somebody have some article or solution to help me? Thanks a lot!!
😶 2
k
Since this is a Compose question, you should it ask in #compose But to answer your question - you can use Glide with compose (here’s the doc on integration)
c
Thank you for the answer. I was thinking about Glide but as the images are on Firebase I can’t get them directly from URL because it needs login to download the images, and the Glide doc doesn’t show a way to load directly from a bitmap instead a URL. So I’m not sure if I can cache them. If you have any idea how can I handle it I would be thankful.
j
And it works really great with compose
c
Thank you, it helped me too.
185 Views