Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding an option in AudioServiceConfig to switch to lower priority state on AudioProcessingState.completed #1053

Open
skiluk opened this issue Dec 15, 2023 · 3 comments

Comments

@skiluk
Copy link

skiluk commented Dec 15, 2023

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

@skiluk
Copy link
Author

skiluk commented Dec 15, 2023

PR added here

@Mordtimer
Copy link

Mordtimer commented Feb 16, 2024

@ryanheise wouldn't the proposed PR solve #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 +.

@ryanheise
Copy link
Owner

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).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants