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

Tell media router to discover cast devices #780

Merged
merged 3 commits into from
Feb 17, 2023
Merged

Conversation

mchowning
Copy link
Contributor

@mchowning mchowning commented Feb 16, 2023

Description

This updates the app to ask the MediRouter to check for available Chromecast devices. This avoids the chromecast button disappearing because the MediaRouterButton will automatically hide itself if it thinks there aren't any chromecast devices available.

I'm making these changes based on the documentation for MediaRouteActionProvider available here.

Fixes #777

Testing Instructions

  1. Connect your device to a wireless network with at least one chromecast device available (I have multiple chromecast devices on my network, I'm not sure if that is necessary to cause the underlying bug).
  2. Go to the Podcasts tab
  3. ✅ Observe that the chromecast button is visible (possibly after a very short delay)
  4. Background the app and reopen it
  5. ✅ Observe that the chromecast button is visible (possibly after a very short delay)
  6. Repeat steps 4 and 5 a few times.

Screenshots or Screencast

Before After
Screen.Recording.2023-02-16.at.10.27.48.AM.mov
Screen.Recording.2023-02-16.at.10.28.47.AM.mov

Checklist

  • If this is a user-facing change, I have added an entry in CHANGELOG.md
  • I have considered whether it makes sense to add tests for my changes
  • All strings that need to be localized are in modules/services/localization/src/main/res/values/strings.xml
  • Any jetpack compose components I added or changed are covered by compose previews

@mchowning mchowning added this to the 7.33 milestone Feb 16, 2023
@mchowning mchowning marked this pull request as ready for review February 16, 2023 15:40
@mchowning mchowning requested a review from a team as a code owner February 16, 2023 15:40
Copy link
Contributor

@ashiagr ashiagr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice fix, @mchowning! 🌟 The Chromecast icon now appears more consistently.

@ashiagr ashiagr merged commit ad0770e into main Feb 17, 2023
@ashiagr ashiagr deleted the fix/chromecast-discovery branch February 17, 2023 07:04
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.

Chromecast button missing unless force-stopping app
2 participants