Is Android NSD (Network Service Discovery) compatible with Bonjour service in iOS?
Asked Answered
M

1

26

I will create a server-less local networking App for iOS and Android. the App in both iOS and Android devices should find out and talk to each other.

I know that there are platform built-in services (which are Bonjour in iOS and NSD in Android since v4.1), in addition, a open source jmdns package can be used out of the box as well.

I don't know how to choose and how is their compatibility.

My questions are:

  1. Is Android NSD (network service discovery) compatible with Bonjour in iOS? What should I use for service discovery in my App.
  2. Do I need to use third-party lib if i also develop PC version for the App?
Medicable answered 22/1, 2014 at 8:32 Comment(1)
Have you made application using NSD in Android and Bonjour in iOS? Is it robust?Territus
A
20

I developed similar project. Let me answer your questions:

  1. Yes. The official sample code should be able to make your quick start. Implement the function of service discovery is very easy. Only two steps: setting up a discovery listener with the relevant callbacks, and making a single asynchronous API call to discoverServices().
  2. If you use the third-party library, Advantage: It can make your application works below Android 4.1;Disadvantage: Developing the function of service discovery would more complex. Because of you need write a background service to listen to broadcasts on the network.
Ambages answered 22/1, 2014 at 9:36 Comment(2)
Do you have PC version of your app? how to implement service discovery in your PC version of app?Medicable
On windows platform, we used Apple Bonjour SDK. On Linux, we used Avahi. FYI.Ambages

© 2022 - 2024 — McMap. All rights reserved.