Hi all, I am developing a sort of media player for android. The question is how can i get the cover art of audio file on android. For example the default android media player shows album covers when listing albums, how can i get this artworks.
Android only recognizes files named "AlbumArt.jpg" as Album Covers. Just put the pictures with that name in the album folder and you'll be fine..
I don't know if you read that google is making Stackoverflow the official Android app development Q&A medium but for beginner questions... Now, I know nothing about developing in andriod, but a quick search of the Android Developers site, I found this:
Hopefully it'll help.
Based on your comments to others, it seems like your question is less about Android and more about how to get album art in general. Perhaps this article on retrieving album art from Amazon will be helpful. Once you have a local copy and store it as Nick has suggested, I believe you should be able to retrieve it the way Fudgey suggested.
Uri sArtworkUri = Uri.parse("content://media/external/audio/albumart");
Uri uri = ContentUris.withAppendedId(sArtworkUri, album_id);
ContentResolver res = context.getContentResolver();
InputStream in = res.openInputStream(uri);
Bitmap artwork = BitmapFactory.decodeStream(in);
More complete sample code can be found in Android Music player source here http://www.google.com/codesearch/p?hl=en#kYM2IxnT114/src/com/android/music/MusicUtils.java&q=getArtwork&exact_package=git://android.git.kernel.org/platform/packages/apps/Music.git&sa=N&cd=1&ct=rc&l=25 method getArtwork.