How to check if the AlbumArt exists?

315 Views Asked by At

I have some Music-Files and some have an artwork and some not.

I use their Uri to load them but I don't know how to check if the Artwork is available or not!

The Uri I have:

public Uri getAlbumArtworkUri(long AlbumID) {
        Uri ArtworkUri = Uri.parse("content://media/external/audio/albumart");

        return ContentUris.withAppendedId(ArtworkUri, AlbumID);
}

Does anybody have an idea?

Thanks!

1

There are 1 best solutions below

1
the_dani On BEST ANSWER

I solved it in another way...

The Library Picasso for instance has a method called ".placeholder()".

Picasso.with(mContext).load(AlbumUri).placeholder(standard-/placeholder-image).resize(Width, Height).into(ImageView);