Open skiluk opened 11 months ago
@ryanheise wouldn't the proposed PR solve https://github.com/ryanheise/audio_service/issues/996 (and many other duplicates of it) at the same time?
You will not need to worry about pausing audio during interruption because of not having permissions to startForeground from the background in Android 12 +.
Hi @Mordtimer , there are further discussion points raised in that PR (if you don't mind, you would be welcome to comment on those discussion points over on that PR).
Feature proposal
This would work similar to androidStopForegroundOnPause except stopForeground and stopSelf would be triggered when AudioProcessingState.completed.
Motivating use case(s)
We have an app that uses multiple audio files to play to the user in one stream of audio. Throughout this process we pause/unpause so the androidStopForegroundOnPause causes issues when playing in background as we do not have permissions to startForeground from the background. Using this feature would allow the notification to be dismissed when the audio is completed.
I have a PR almost completed for this feature if you would like me to submit