mirror of
https://github.com/meditohq/medito-app.git
synced 2024-09-11 12:15:46 +03:00
Stop service on audio complete (android)
This commit is contained in:
parent
812fb7a2e3
commit
a5ac71d015
@ -304,6 +304,9 @@ class AudioPlayerService : MediaSessionService(), Player.Listener, MeditoAudioSe
|
||||
meditoAudioApi?.updatePlaybackState(state) {
|
||||
if (primaryPlayer.playbackState != Player.STATE_ENDED) {
|
||||
handler.postDelayed(this, 250)
|
||||
} else {
|
||||
stopForeground(STOP_FOREGROUND_REMOVE)
|
||||
stopSelf()
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user