Skip to content

fix: Prevent crash when no CastContext shared instance found#1015

Merged
theovilardo merged 2 commits intotheovilardo:masterfrom
LarveyOfficial:larvey/fix-cast-context-crash
Feb 9, 2026
Merged

fix: Prevent crash when no CastContext shared instance found#1015
theovilardo merged 2 commits intotheovilardo:masterfrom
LarveyOfficial:larvey/fix-cast-context-crash

Conversation

@LarveyOfficial
Copy link
Copy Markdown
Contributor

@LarveyOfficial LarveyOfficial commented Feb 9, 2026

Issue

When CastContext is called for its shared instance, it does not properly handle the instance in which a user does not have proper Google Play Dependencies.

Solution

Ensures that if a user does not have this Google Play Dependency available (like on my HiBy M500), instead of crashing, the app simply does not cast when selecting a destination.

From what I can tell the rest of the application seems to work fine, and I can even pull up the cast sheet and shows devices, it just results in nothing happening when casting to devices.

Notes

I think this should be fine as it allows those without Google Play Services to still launch and use the app as is, but because they don't have the needed services they simply cannot use the app fully.

Further checks can be added in the future that can indicate to the user that they cannot cast due to not having Play services, but for now (at least for me) this solution should be alright.

(Personally I just wanted this so I could use this app on my HiBy M500 and still be able to update in the future, so I am hoping this can be merged in)

This should resolve #436

@theovilardo
Copy link
Copy Markdown
Owner

Hi! This is very helpful for a lot of users, but I'm currently fixing bugs on the Cast state Holder, could you rebase on the latest commit on master branch so this can be added?

@LarveyOfficial
Copy link
Copy Markdown
Contributor Author

@theovilardo this is already up to date I believe! Let me know if I am wrong

@theovilardo
Copy link
Copy Markdown
Owner

Do you have the commit number you based the branch of?

@theovilardo this is already up to date I believe! Let me know if I am wrong

@LarveyOfficial
Copy link
Copy Markdown
Contributor Author

Do you have the commit number you based the branch of?

@theovilardo this is already up to date I believe! Let me know if I am wrong

d1d02fb
This one

@LarveyOfficial
Copy link
Copy Markdown
Contributor Author

@theovilardo according to the repo that is the newest commit unless I am in looking in the wrong place.

@theovilardo
Copy link
Copy Markdown
Owner

Perfect

@theovilardo according to the repo that is the newest commit unless I am in looking in the wrong place.

@theovilardo theovilardo merged commit 10813e3 into theovilardo:master Feb 9, 2026
@LarveyOfficial LarveyOfficial deleted the larvey/fix-cast-context-crash branch February 10, 2026 02:12
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.

[BUG] Play services dependency

2 participants