I tried 2 days full and even after that I really can't display my MP3 file's album art. The MP3 file is located in R.raw.t
. Can anyone help me with this?
Asked
Active
Viewed 3,430 times
0

Smi
- 13,850
- 9
- 56
- 64

user722476
- 3
- 1
- 3
-
So you have the mp3 file in R.raw.t. Where is the album cover image you want to display? – RoflcoptrException Apr 24 '11 at 09:25
1 Answers
0
Found this older Topic.
It seams, that the given link to the Android Music Player-App isn't available anymore. But, a Mirror on GitHub can be found here.
If we now take a look on the 'MusicUtils'-class, we see that the Album ID comes from an Object called 'sService', which is a 'IMediaPlaybackService'-Instance. This is an AIDL-File, so we look at the implementation in the 'MediaPlaybackService'-Class.
So this is the 'getAlbumID()'-method we find:
public long getAlbumId() {
synchronized (this) {
if (mCursor == null) {
return -1;
}
return mCursor.getLong(mCursor.getColumnIndexOrThrow(MediaStore.Audio.Media.ALBUM_ID));
}
}
'MediaStore' is a standard Android Content-Provider, which is documented here.

Community
- 1
- 1

Lukas Knuth
- 25,449
- 15
- 83
- 111
-
Anything on what is not working, what are our problems and do you get any errors might help us solving this problem. – Lukas Knuth Apr 26 '11 at 20:21
-
Provide some Error code or what is happening, I can't help you with that less informations. – Lukas Knuth Apr 28 '11 at 18:37