Android Auto/Automotive Podcast + Filter Page Played Episode Issue
What I expected
When an episode is played fully it will disappear from the Podcast or Filter page it's on.
What happens
If you have the Podcast page opened which lists all of the episodes, the episode which you played fully does not automatically disappear. Going back to the homepage, then opening the podcast page again resolves it.
Reported in https://woothemes.zendesk.com/agent/tickets/5476176 Reproduced https://a8c.slack.com/archives/C02A333D8LQ/p1661253982975559
Debug logs from ticket: debug-2.txt
This is also an issue on Android Automotive.
- Ensure that the app's settings are set to not "Show Played Podcasts"
- Go to the discover screen
- Open a podcast page
- Tap on a podcast to start playing it
- Complete the episode
- Tap the back arrow to return to the podcast page
- Observe that the just-completed podcast is still listed
- Tap back to go to the Discover page
- Tap on the podcast that you were just looking at
- Observe that the just-played podcast is now removed from the list
https://user-images.githubusercontent.com/4656348/205943388-5ba88f71-0fd2-4b1c-ae4e-38d956fe7b25.mov
When clearing the app data on sign out, I also see this issue with the Podcasts tab (subscribed podcasts will still show until you switch to another tab and then back to the podcasts tab).
UPDATE: Here is some code I quickly hacked together which allowed me to verify that notifying the playback service that the podcast screen has changed is sufficient to reload that tab programmatically. I don't like how I'm storing the service instance in a global field though—I feel like there's got to be a better way to get hold of the service instance.