You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
avahi-browse -rv _apple-mobdev2._tcp
Server version: avahi 0.6.31; Host name: linux.local
E Ifce Prot Name Type Domain
enp0s31f6 IPv4 7c:01:91:1e:3a:9d@fe80::7e01:91ff:fe1e:3a9d _apple-mobdev2._tcp local
= enp0s31f6 IPv4 7c:01:91:1e:3a:9d@fe80::7e01:91ff:fe1e:3a9d _apple-mobdev2._tcp local
hostname = [jiujiu.local]
address = [192.168.13.24]
port = [32498]
txt = []
: All for now
: Cache exhausted`
@jet6666 in your setup above what kind of Android device did you use (phone, Android version)? And am I correct that your Android device is called "jiujiu"?
The plugin uses InetAddress#getCanonicalHostName to resolve the IP adresses coming from the NsdManager
The method returns the adress as a string if cannot resolve the host name (this is what you're seeing)
When I tried this out on the emulator (see post above) the host name could not be resolved. I don't exactly know why that is, but my guess is it's because the emulator device is not really part of the DNS network, so it doesn't get a proper hostname assigned.
On a real device it should work though - and it did on my device (Android 12). To be able to find out more about this I'd need some information about your specific setup.
I can not reproduce this behavior on physical devices, only on the emulator, where the missing host name is expected. Please feel free to open another issue if you observe this on a real-life device.
Description
enableLogging(LogTopic.calls);
currentDiscovery = await startDiscovery('_apple-mobdev2._tcp', ipLookupType: IpLookupType.v4 );
currentDiscovery?.addServiceListener((service, status) async {
developer.log('service.name =${service.name} ,host = ${service.host} .toString= ${service.toString()} ');
in iOS is correct .
in Android , the host is always the ipaddress.
in Linux :
= enp0s31f6 IPv4 7c:01:91:1e:3a:9d@fe80::7e01:91ff:fe1e:3a9d _apple-mobdev2._tcp local
hostname = [jiujiu.local]
address = [192.168.13.24]
port = [32498]
txt = []
: All for now
: Cache exhausted`
I use App Service Browser , It can get corrent hostname.
Scenario
Other (please describe above)
Platform
Android
The text was updated successfully, but these errors were encountered: