How to get list of all devices connected to same network using NSD

1k Views Asked by At

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?

1

There are 1 best solutions below

0
On

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'