Hello there. This is an Android-related question. I need to load images from some remote source. These images are
BLOB
objects. I implemented a service that fetches these images by leveraging the power of Kotlin
Coroutines
. This service is quite simple, it just exposes a
suspend fun
. I used it as one-shot operation inside a
ViewModel
, so the scoping here was easy. Now I need to use this image loader inside a
RecycerView
. So the scoping there gets tricky: how do I manage a
CoroutineScope
inside a
RecyclerView
? As far as I understand, I cannot use
Glide
,
Picasso
or
Coil
, since it is bound to uri/url image sources. So I need to implement it myself. Where do I start? Should I somehow use a
LifecycleOwner
in order to get that scoping feature?
Any help will be very appreciated. 🏅