From 69d789c4f863f4ad9cf987371970da7d537cbfe6 Mon Sep 17 00:00:00 2001 From: Antoine POPINEAU Date: Mon, 21 Oct 2019 18:59:48 +0200 Subject: [PATCH] Add seek bar on notification for Android 10+. --- .../com/github/apognu/otter/playback/MediaControlsManager.kt | 1 + 1 file changed, 1 insertion(+) diff --git a/app/src/main/java/com/github/apognu/otter/playback/MediaControlsManager.kt b/app/src/main/java/com/github/apognu/otter/playback/MediaControlsManager.kt index 4bef0be..b840ba6 100644 --- a/app/src/main/java/com/github/apognu/otter/playback/MediaControlsManager.kt +++ b/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 { putString(MediaMetadata.METADATA_KEY_ARTIST, track.artist.name) putString(MediaMetadata.METADATA_KEY_TITLE, track.title) + putLong(MediaMetadata.METADATA_KEY_DURATION, (track.bestUpload()?.duration?.toLong() ?: 0L) * 1000) }.build()) notification = NotificationCompat.Builder(