Эх сурвалжийг харах

Starts foreground service before stopping it to avoid app crash when listening to an audio file

Signed-off-by: Guillermo Mtz Espina <gmotzespina@icloud.com>
Guillermo Mtz Espina 3 жил өмнө
parent
commit
12b75dce7b

+ 2 - 1
src/main/java/com/nextcloud/client/media/PlayerService.kt

@@ -178,7 +178,8 @@ class PlayerService : Service() {
             player.stop(file)
         }
 
-        stopSelf()
+        startForeground(R.string.media_notif_ticker, notificationBuilder.build())
         stopForeground(true)
+        stopSelf();
     }
 }