0

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?

Smi
  • 13,850
  • 9
  • 56
  • 64
user722476
  • 3
  • 1
  • 3

1 Answers1

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