0

I am working with NSDManager in android. How this DiscoveryListener can be used to fetch all the devices. Here in documentation given the approach of finding the services but how to implement them in android studio. I had tried something using this docs reference but how to fetch all the list.blue print of my code

I created an arraylist to add the list of devices that is implemented in onServiceFounddiscovery listener implementation In onCreate method I also called discovery linstener. I also gave preferences in manifest file. Is there even more to do to get the list?

Rognik
  • 145
  • 13
  • NSD will not find you "all devices connected to the network". NSD finds the devices offering a specific service on the network (and only if they've registered their service with it). In your example, you are looking for http services, so you would only find the NSD aware web servers. Or any compatible with DNS-SD which is the underlying methodology. – JoeHz May 19 '17 at 07:20
  • 1
    oh, why do you put a screenshot of code instead of code itself... – jfly May 19 '17 at 07:45
  • @JoeHz thanks for your reply. Of course I am also trying for that.. The list of registered services. How this listener works to get the list of the registered services. – Rognik May 19 '17 at 09:55

1 Answers1

0

If you are simply looking for just the Services available, this has been asked before on SO.

How to find all available services using Android's native Network Service Discovery

This post might get flagged as a duplicate. Just sayin'

Community
  • 1
  • 1
JoeHz
  • 2,136
  • 1
  • 18
  • 29