I have a Bonjour service running on my MacBook Pro on my local network that I am trying to detect in a client app on an Android device (Galaxy Nexus).
I have implemented Bonjour service discovery two ways. The first is via Android's NSD package, which is detailed here. I have implemented the code they suggest in the section "Discover Services on the Network". It discovers my service just fine, but there is no API call to access the txt records for that service, which I need access to so I can build the URL to hit for the service, making this method kind of a deal-breaker until I can access that.
That prompted me to try the other method of Bonjour service discovery detailed here in the "Discover Nearby Services" section, since they have an API for txt record discovery. I know the service discovery starts, because it's not logging any errors, but this method does not discover any Bonjour services for me, not even all the ones Apple has on their MacBooks by default. It's implemented exactly as it is on their website, so what do I need to do to make this work? Does my MacBook need to run something in addition to the Bonjour service so that it is recognized as a WiFi-Direct device? Or is this just not possible using Android's API with this set up, and should I be looking to libraries like JmDNS to do what I need until Android's API is more complete/documented?
There seems to be very little documentation, aside from what Android provides (which isn't super thorough), for these new Nsd APIs, so if anyone else has dived into this and can give more guidance, it would be greatly appreciated!