Comments (3)
Note that apparently on Android, registering a Service gives registration.service.host == null
Yes, Android's NsdManager doesn't set the host on the registered service. It's the same on macOS and iOS. Only Windows API will set the host there AFAIK.
Side note: is there an easy way to get the host before registering, so I can add the ip addresses to addresses before registering a host potentially with no way to contact it?
The host will only be null
when registering services. It basically means "localhost". When discovering services, there should always be a valid host name in the service object, even for services that are on the same host.
Any idea why PIXEL is only showing up in scans for the other Android?
So if I understand it correctly, the service on your Android Pixel device doesn't appear in the nsd example apps running on your two Windows machines. But when you run dns-sd
on the same machines, it shows up. Right?
First, the Pixel's host name "Android-3.local" doesn't seem to be resolvable in your network. This seems strange, maybe you could investigate that. This could definitely be a problem for the plugin if you have IP lookup enabled. But I had a short look at your code and I don't think you do.
Second, I agree with you that if dns-sd
lists the service, the plugin should too. Could you try the following:
Open the example app on your Windows machine with Android Studio. Modify the follwing part in nsd/nsd/example/lib/main.dart:
MyAppState() {
enableLogging(LogTopic.calls);
enableLogging(LogTopic.errors); // add this line
}
Now start the example app using Android Studio. You should see log messages such as
[MethodChannelNsdPlatform] [2022-11-26 12:30:30.065382] [calls] Callback: onServiceDiscovered {handle: f66df09b-d98f-4dae-82de-ebc5a412b674, service.name: Some Service(1), service.type: _http._tcp}
Now start the PIXEL service on your Android device and see if anything related to the Pixel device comes up. Or anything dodgy such as errors.
BTW is any of your devices Android 13?
from nsd.
P.S.: also, it seems like there's two competing domains in your network: local and lan. If I had to guess, that could have something to do with it. I.e. not all devices are in all the domains, so they cannot all see each other.
from nsd.
Since I cannot reproduce this issue in my environment, I'll close it for now. Feel free to file another issue if the problem should persist.
from nsd.
Related Issues (20)
- mDNS Service registered with nsd not resolving correctly. HOT 2
- Select on which network interface to search HOT 1
- Windows: when the device name contains Chinese, the client cannot find the service.
- Flutter windows app crashes randomly on start HOT 8
- NsdError (message: "missing required configuration HOT 11
- stopDiscovery Not working giving below exception HOT 3
- nsd 2.3.1 Not compatible uuid 4.1.0 HOT 1
- (warning) 'com.haberey/nsd' channel message on a non-platform thread HOT 1
- `stopDiscovery` should `dispose()` the `Discovery` HOT 3
- Android: failure on unregistration does not report back to dart side HOT 1
- [Question] Unregistering service when app crushes or when a user terminated app in force. HOT 2
- Works on iOS sim but not on actual device HOT 1
- Include permissions as part of the dependency HOT 1
- Add Linux support HOT 2
- pub.dev Changelog tab is reversed
- Get all serviceTypes does not work
- Error running inside isolate
- Discovery not working on macOS
- '_services._dns-sd._udp' not working on real IOS device. HOT 3
- On Android, the IP address and not the hostname is returned in the host field of a Service after a discovery
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nsd.