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

Fix Chromecast setup #34

Merged
merged 5 commits into from
Aug 30, 2024
Merged

Fix Chromecast setup #34

merged 5 commits into from
Aug 30, 2024

Conversation

MattiasBuelens
Copy link
Collaborator

The ChromecastButton wasn't working correctly:

  • It didn't show up automatically, even when there are Chromecast receivers available on the Wi-Fi network.
  • When starting to cast, the app crashed with the following error:
    java.lang.IllegalArgumentException: background can not be translucent: #0
        at androidx.core.graphics.ColorUtils.calculateContrast(ColorUtils.java:176)
        at androidx.mediarouter.app.MediaRouterThemeHelper.getControllerColor(MediaRouterThemeHelper.java:179)
        at androidx.mediarouter.app.MediaRouterThemeHelper.getRouterThemeId(MediaRouterThemeHelper.java:314)
        at androidx.mediarouter.app.MediaRouterThemeHelper.createThemedDialogStyle(MediaRouterThemeHelper.java:158)
        at androidx.mediarouter.app.MediaRouteChooserDialog.<init>(MediaRouteChooserDialog.java:142)
    

This PR fixes these issues, and makes Chromecast work out-of-the-box in our demo app. I also added a new guide explaining how to do this in your own app.

Thanks @ceyhun-o for reporting!

@MattiasBuelens MattiasBuelens added the bug Something isn't working label Aug 30, 2024
@MattiasBuelens MattiasBuelens merged commit d8ecb96 into develop Aug 30, 2024
1 check passed
@MattiasBuelens MattiasBuelens deleted the fix-chromecast branch August 30, 2024 15:13
@m-derakhshan
Copy link
Contributor

@MattiasBuelens
Hello,
Thank you for addressing this request quickly. May I kindly ask for a deployment so we can use it in our app?

@MattiasBuelens
Copy link
Collaborator Author

@m-derakhshan We're going to fix #35 first, since otherwise Chromecast is still not very usable. But expect a new release soon. 😉

@MattiasBuelens
Copy link
Collaborator Author

@m-derakhshan Fix is in 1.7.3. 🚀

@m-derakhshan
Copy link
Contributor

@MattiasBuelens
oh thank you. that was fast :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants