Questions tagged [nsd]

Network Service Discovery (NSD) allows the identification of devices on the local network that support the services your software requests.

Network Service Discovery (NSD) allows the identification of devices on the local network that support the services your software requests. This is useful for a variety of peer-to-peer applications such as file sharing or multi-player gaming. Devices have software that can broadcast its name and connection information to the local network and scan for information from other applications doing the same.

76 questions
3
votes
1 answer

Android NSD: Why service type don't match

I've created an app to test the network service discovery (NSD) on android. The failing scenario Two devices running the app. I hit register on the first device and after I see a toast that confirms the registration I hit discover on the…
Themelis
  • 4,048
  • 2
  • 21
  • 45
3
votes
0 answers

Android Network Service Discovery get hostname (mDNS/Zeroconf)

I am trying to get the hostname from a service that is advertising itself on my local network using mDNS/Zeroconf. I am using Android's Network Service Discovery API, but it seems as if Android doesn't use the advertised hostname but tries to do a…
reinder
  • 2,531
  • 2
  • 24
  • 46
3
votes
0 answers

Android Network Service Discovery with Ipv6

I have develop a new android app. This app creates a HotSpot networks and a service. But There is a problem. In client side of network discovery service resolve IPv6 adress of my android app so the client can not connect to my service via tcp…
Zapateus
  • 516
  • 3
  • 8
  • 21
3
votes
3 answers

Get IPv4 and IPv6 address using NsdServiceInfo?

I used NSDServiceInfo.getHost (). getHostAddress () output is the IPv4 to IPv6 device and router. for the device, I can already IPV4 so I need IPv6. as well as to the router, I can already so I need IPV4 IPV6. The solution I have tried. but when his…
3
votes
1 answer

Android NSD : Registration of service is not happening on emulator

I want to register a NSD service through the emulator app. The emulator is running on my linux ubuntu machine connected to my local network. I followed the instructions as listed here. I am able to register the service when I run the app on my…
Codelearner
  • 241
  • 2
  • 3
  • 16
3
votes
2 answers

What do the errorCodes mean for Android NSD onResolveFailed()

Android Network Service Discovery provides us with an onResolveFailed() callback, like so: NsdManager.ResolveListener mResolveListener = new NsdManager.ResolveListener() { @Override public void onResolveFailed(NsdServiceInfo serviceInfo,…
Ivo Renkema
  • 2,188
  • 1
  • 29
  • 40
2
votes
0 answers

I'm experiencing difficulty with network service discovery (NSD) in my android project as I sometimes can't obtain an IP address

I am using the NSD (Network Service Discovery) NsdManager.DiscoveryListener to discover services on the network. However, in the onServiceFound method, I am sometimes unable to retrieve the IP address from the NsdServiceInfo object. Despite…
Pratik A
  • 31
  • 3
2
votes
1 answer

Retrieving NsdManager always leaks Activity

While profiling my app, I found, that retrieving the NsdManager by using nsdManager = (NsdManager) getSystemService(Context.NSD_SERVICE); // LEAKS! is leaking the Activity, while nsdManager = (NsdManager)…
roplacebo
  • 2,837
  • 2
  • 17
  • 19
2
votes
0 answers

NsdManager discovers, immediately loses and re-discovers same service after WiFi is re-enabled on Android phone

In my Android app I have to show a list of available services on the network published by another machine (RPi 3B con Raspbian Stretch) using avahi 0.6.32 (Bonjour/zeroconf daemon for Linux). I obtain the list on Android phone using NsdManager.…
DarkJediNinja
  • 495
  • 6
  • 10
2
votes
0 answers

Android NSD: registerService returns Port 0 and Host null

I'm trying to connect two Android devices via Network Service Discovery API (NSD) in a network. I followed the official Android webpage during implementation. One of the devices acts as the server and the other acts as the client. I ask the network…
baja
  • 53
  • 4
2
votes
0 answers

NsdManager never discover any services on Google Pixel 3 (Pie)

Same code works on Samsung S8 and Sony XZ, but not on Google Pixel 3. I start the discovery with NsdManager with: nsdManager.discoverServices("_test_service._tcp.", NsdManager.PROTOCOL_DNS_SD, discoveryListener) The discoveryListener gives…
Lalle
  • 676
  • 12
  • 30
2
votes
1 answer

Android Pixel 2 (8.1) DNS service discovery failure

Observing issue in discovering service of iOT device in Pixel 2. OS 8.1 in other devices like Nexus / Pixel 1 find the serviceType with no issues. Using NSD serviceDiscovery() , the log gets displays for Service Discovery Started. But its not…
JnJ11
  • 35
  • 5
2
votes
1 answer

Android JmDNS how to remove service

im currently writing an android app, which should keep track of other devices in the same wifi network using JmDNS. The discovery process works correctly, but i don't know how to keep track of other devices especially noticing their removing. As…
Iconic
  • 41
  • 3
2
votes
0 answers

serviceInfo.getAttributes is empty in onServiceResolved in Android 5.1 to 6.0 (Network Service Discovery)

I am trying to read TXT records in my app .ATTRIBUTES TEST is {}. public void onServiceResolved(NsdServiceInfo serviceInfo) { Log.e("ATTRIBUTES TEST",serviceInfo.getAttributes()+""); }
2
votes
0 answers

how does service registration work with NsdManager?

I've just started working with Multicast DNS using the NSDManager class for Android. I came upon the NsdChat example from this link…
Giang Pham
  • 41
  • 5