0

Have you succeeded in service discovery using jmdns in Android? I'm facing same problem not able to discover services using jmdns in Android.

From my code using jmdns I am trying to discover services of type:

jmdns.addServiceListener("_afpovertcp._tcp.", listener);
ServiceInfo[] infos = jmdns.list("_afpovertcp._tcp."); 

I have installed _afpovertcp._tcp service type (Avahi package) on my Linux Ubuntu PC. My Android phone with my code and linux machine both are configured to WI-FI. Still not able to discover my Linux PC.

Daniel Hedberg
  • 5,677
  • 4
  • 36
  • 61
user603194
  • 81
  • 2
  • 4

2 Answers2

3

Yes make sure you are using the latest jMDNS from Sourceforge in their SVN repo and you can see our example in Android here from our open source app.

http://code.google.com/p/tunesremote-plus/source/browse/trunk/src/org/tunesremote/LibraryActivity.java

Melloware
  • 10,435
  • 2
  • 32
  • 62
0

Add the internet permission to your manifest.xml

<uses-permission android:name="android.permission.INTERNET" />

In addition you have to implement the listener. Can you show us your implementation? It has to look like here: Samples with JmDNS

Community
  • 1
  • 1
RaphMclee
  • 1,623
  • 13
  • 16