Skip to content

Instantly share code, notes, and snippets.

@zeroarst
Last active February 17, 2022 07:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save zeroarst/b2f9cedd697b711c2a118e96f8133060 to your computer and use it in GitHub Desktop.
Save zeroarst/b2f9cedd697b711c2a118e96f8133060 to your computer and use it in GitHub Desktop.
Notification.MediaStyle
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
mediaSession.setMetadata(
MediaMetadataCompat.Builder()
.putString(MediaMetadata.METADATA_KEY_TITLE, title)
.putString(MediaMetadata.METADATA_KEY_ARTIST, PlaybackAudioInfo.artist)
.build()
)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment