javaandroidartwork

How to check if the AlbumArt exists?


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!


Solution

  • 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);