Skip to content Skip to sidebar Skip to footer

How Can Get Album Art Of Song From Url

want get album art of song from url and this is my try so far : SongPath = 'www.asd.com/music.mp3'; android.media.MediaMetadataRetriever mmr = new MediaMetadataRetriever();

Solution 1:

You can use Glide in a similar way you would use it for a File: bumptech/glide#699 if you can figure out how to do it remotely. The problem is that you still need to download the whole .mp3 file, which takes that 4-5 seconds I guess. I'm not exactly sure about the .mp3 format, but I think the album art may be at the end of the file. For this reason this approach is not suggested (similar to how it's a bad idea to load video thumbs from http). If you want to go this way anyway, then slap a .diskCacheStrategy(SOURCE) on the load to save the file first, and then write a custom decoder to use

The best approach is to have the album art served from a separate file if you host the mp3; or use a public service to retrieve it. See any album art downloader program for possible services.

One thing's for sure: without a protocol, nothing will work, prefix your www. with http:// or https:// as necessary.

Post a Comment for "How Can Get Album Art Of Song From Url"