I'm working on an Android app where I display a list of local audio files. Currently, I'm using ContentResolver.loadThumbnail() to get the thumbnails (album art) for these audio files, but this method takes some time and causes delays in UI rendering.
I'm already using the Coil library for image loading and caching in my app, and I'd like to use it to load the audio file thumbnails more efficiently.
Here’s a simplified version of what I currently do:
val thumbnail = contentResolver.loadThumbnail(
uri,
Size(200, 200),
null
)
Is there a way to use Coil to load these thumbnails directly using the uri or MediaStore data? Or is there a recommended way to wrap loadThumbnail so that Coil handles the loading and caching in the background?
Any help or code examples would be appreciated!