Skip to content

Commit

Permalink
Add album title in MediaDescription
Browse files Browse the repository at this point in the history
  • Loading branch information
z-huang committed Sep 17, 2022
1 parent 5c69e5b commit 7fd4f78
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions app/src/main/java/com/zionhuang/music/models/MediaMetadata.kt
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package com.zionhuang.music.models

import android.os.Parcelable
import android.support.v4.media.MediaDescriptionCompat
import android.support.v4.media.MediaMetadataCompat.METADATA_KEY_ALBUM
import android.support.v4.media.MediaMetadataCompat.METADATA_KEY_ARTIST
import androidx.core.net.toUri
import androidx.core.os.bundleOf
Expand Down Expand Up @@ -42,6 +43,7 @@ data class MediaMetadata(
.setIconUri(thumbnailUrl?.toUri())
.setExtras(bundleOf(
METADATA_KEY_ARTIST to artists.joinToString { it.name },
METADATA_KEY_ALBUM to album?.title,
EXTRA_MEDIA_METADATA to this
))
.build()
Expand Down

0 comments on commit 7fd4f78

Please sign in to comment.