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

Services are not discovered on Android #59

Open
mbalmer opened this issue May 25, 2024 · 2 comments
Open

Services are not discovered on Android #59

mbalmer opened this issue May 25, 2024 · 2 comments

Comments

@mbalmer
Copy link

mbalmer commented May 25, 2024

Using this in a flutter app for iOS and Android. While it works as expected on iOS, it does not discover the services on Android. This is on Android 14 (Samsung Galaxy A34 5G)

@mbalmer
Copy link
Author

mbalmer commented May 25, 2024

Here is some logcat output, the code runs for 30 seconds, apparently something is found by MdnsDiscoveryManager, but not returned to the stream:

2024-05-25 12:04:23.842 25445-25493 flutter                 ch.msys.trx_control                  I  trx-control: start discovery
2024-05-25 12:04:23.845  1501-1798  serviceDiscovery        system_server                        I  [MdnsDiscoveryManager] Registering listener for serviceType: _trx-control._tcp.local
2024-05-25 12:04:24.948  1501-1798  serviceDiscovery        system_server                        I  [MdnsDiscoveryManager._trx-control._tcp.local-104/40] Handling response from service: trx-control (trxd) on trx-control-w2, newServiceFound: false, serviceBecomesComplete: false, responseIsComplete: true
2024-05-25 12:04:53.856 25445-25493 flutter                 ch.msys.trx_control                  I  trx-control: stop discovery
2024-05-25 12:04:53.860  1501-1798  serviceDiscovery        system_server                        I  [MdnsDiscoveryManager] Unregistering listener for serviceType:_trx-control._tcp.local

@mbalmer
Copy link
Author

mbalmer commented May 25, 2024

I turns out that the service name matters. If I try to discover "_trx-control._tcp" it is found on iOS, but not on Android. If I add a dot ("_trx-control._tcp.") then it is discovered on iOS and Android. This is weird, and maybe worth mentioning in the docs?

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

No branches or pull requests

1 participant