So I am trying to display an audio artwork in the notification panel on Android, but I don't seem to know how to get it to work out right.
In the example on the pub.dev site, it used an image URL for the notification artwork, and this was the code it used:
AudioSource.uri(
Uri.parse('https://example.com/song1.mp3'),
tag: MediaItem(
// Specify a unique ID for each media item:
id: '1',
// Metadata to display in the notification:
album: "Album name",
title: "Song name",
artUri: Uri.parse('https://example.com/albumart.jpg'),
),
),
The artUti is getting the image from an online site, but in my case, I am trying to get it from a local audio file, for which the image link is similar to this content://data/...
I have really tried to debug it, but it is not working out fine for me.
Thanks.