From 73b9f591fb86b8c5ff4d0310f159cb7a6f7e7fd3 Mon Sep 17 00:00:00 2001 From: algosketch Date: Thu, 7 Dec 2023 20:40:03 +0900 Subject: [PATCH] =?UTF-8?q?feat=20:=20=EC=95=B1=EC=9D=B4=20=EC=99=84?= =?UTF-8?q?=EC=A0=84=ED=9E=88=20=EC=A2=85=EB=A3=8C=EB=90=98=EB=A9=B4=20Ser?= =?UTF-8?q?vice=EB=A5=BC=20=EC=A2=85=EB=A3=8C=EC=8B=9C=ED=82=A8=EB=8B=A4.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/ohdodok/catchytape/mediasession/PlaybackService.kt | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/android/app/src/main/java/com/ohdodok/catchytape/mediasession/PlaybackService.kt b/android/app/src/main/java/com/ohdodok/catchytape/mediasession/PlaybackService.kt index 4e9a851..59796f6 100644 --- a/android/app/src/main/java/com/ohdodok/catchytape/mediasession/PlaybackService.kt +++ b/android/app/src/main/java/com/ohdodok/catchytape/mediasession/PlaybackService.kt @@ -1,5 +1,6 @@ package com.ohdodok.catchytape.mediasession +import android.content.Intent import androidx.media3.exoplayer.ExoPlayer import androidx.media3.session.MediaSession import androidx.media3.session.MediaSessionService @@ -26,6 +27,11 @@ class PlaybackService : MediaSessionService() { super.onDestroy() } + override fun onTaskRemoved(rootIntent: Intent?) { + player.pause() + stopSelf() + } + override fun onGetSession( controllerInfo: MediaSession.ControllerInfo ): MediaSession? = mediaSession