Browse Source

Add seek bar on notification for Android 10+.

housekeeping/remove-warnings
Antoine POPINEAU 5 years ago
parent
commit
69d789c4f8
No known key found for this signature in database
GPG Key ID: A78AC64694F84063
  1. 1
      app/src/main/java/com/github/apognu/otter/playback/MediaControlsManager.kt

1
app/src/main/java/com/github/apognu/otter/playback/MediaControlsManager.kt

@ -46,6 +46,7 @@ class MediaControlsManager(val context: Service, private val mediaSession: Media
mediaSession.setMetadata(MediaMetadataCompat.Builder().apply { mediaSession.setMetadata(MediaMetadataCompat.Builder().apply {
putString(MediaMetadata.METADATA_KEY_ARTIST, track.artist.name) putString(MediaMetadata.METADATA_KEY_ARTIST, track.artist.name)
putString(MediaMetadata.METADATA_KEY_TITLE, track.title) putString(MediaMetadata.METADATA_KEY_TITLE, track.title)
putLong(MediaMetadata.METADATA_KEY_DURATION, (track.bestUpload()?.duration?.toLong() ?: 0L) * 1000)
}.build()) }.build())
notification = NotificationCompat.Builder( notification = NotificationCompat.Builder(

Loading…
Cancel
Save