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

Make Media Controls work better after battery eviction #7141

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

coezbek
Copy link

@coezbek coezbek commented Apr 26, 2024

The patch allows to restart AntennaPod after being removed by the battery saver from the Media Control. It doesn't start the media, but restores the interface in Media Control to then to start playing.

Description

This improves #7134 and issue #6576. It doesn't really fix the underlying issue that AntennaPod is quickly evicted from memory and can't resume playing from Media Controls.

This patch enables that pressing the play button from Media Controls for an evicted AntennaPod will start AntennaPod again and shows the play controls. The user can then press play again to start the podcast.

I hope this is helpful.

Checklist

The patch allows to restart AntennaPod after being removed by the battery saver from the Media Control. It doesn't start the media, but restores the interface in Media Control to then to start playing.
@ByteHamster
Copy link
Member

ByteHamster commented Apr 28, 2024

Thanks for your PR. Instead of adding workarounds for the existing media service, I would rather try upgrading to media3 media sessions (see #6608). However, it seems that something similar to your fix is needed there as well. The documentation for media3 is really bad, one has to dig through GitHub issues in that library to find solutions for edge cases. Their own sample app doesn't even support the media controls after battery eviction properly.

Edit: Sorry for the duplicate comment. That happens when trying to debug MediaSession stuff while writing a GitHub comment at the same time.

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

Successfully merging this pull request may close these issues.

None yet

2 participants