Repository navigation
Add a network self-check to Diagnostics - #190
Merged
Merged
Conversation
When an iPhone, iPad or Mac can't find CastBay, the person had no way to tell from the TV whether the receiver, the network or the router was at fault. Run network check on About → Diagnostics now reports, item by item, Pass / Problem / Can't verify with a next step: the receiver's state, the network type and IPv4 address, each DNS-SD registration (_airplay._tcp and _raop._tcp) on its own, the AirPlay listener's port, and the latest registration failure with NsdManager's error code. The check only reads state, so it never restarts the receiver or interrupts a cast. The advertiser now keeps each registration's outcome and its latest failure after it stops (it stops itself on a failure), and records failures among the Diagnostics events. What only the phone or router can know, such as AP/client isolation, is always shown as Can't verify. The header buttons wrap so a third fits on narrow screens. Co-Authored-By: Claude <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #189
What changed
_airplay._tcpand_raop._tcpon their own: registered (port) / waiting for Android / failed (NsdManager code and meaning) / not advertisedAirPlayDiscoveryAdvertiserkeeps each registration's state and the latest failure (DiscoveryStatus), including after it stops itself on a failure, and records failures asdiscoveryevents.AirPlayManager.snapshot()exposes it with the receiver state and listener port.checkevent.NetworkCheck.classifyis pure and unit-tested. The UI maps its reasons to strings (English and Simplified Chinese).FlowRow) under the title, because three buttons in one row pushed Upload/Clear off a phone-width screen.No restart action was added, as the issue asks.
Tested
./gradlew assembleDebug :app:testDebugUnitTest :app:lintVitalReleasepasses.NetworkCheckTesthas 9 tests covering classification and state mapping, and checks NsdManager codes against the SDK constants.emulator-5554, Android 16, phone size), debug build viatools/sim:Device checks left for review
🤖 Generated with Claude Code