Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8491501
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T22:26:36+00:00 2026-06-10T22:26:36+00:00

I m looking for an apple bonjour for android. Are there a recommanded jar

  • 0

I m looking for an apple bonjour for android.
Are there a recommanded jar for this?

I googled for an apple bonjour application and I found the Jmdns application http://home.heeere.com/tech-androidjmdns.html.

but when running the DEMO application, a bug appear in the launch of the application. here after the Eclipse LogCat:

09-05 13:56:49.926: E/AndroidRuntime(13243): java.lang.NoClassDefFoundError: javax.jmdns.JmDNS
09-05 13:56:49.926: E/AndroidRuntime(13243):    at com.heeere.android.dnssdtuto.DnssdDiscovery.setUp(DnssdDiscovery.java:44)
09-05 13:56:49.926: E/AndroidRuntime(13243):    at com.heeere.android.dnssdtuto.DnssdDiscovery.access$0(DnssdDiscovery.java:38)
09-05 13:56:49.926: E/AndroidRuntime(13243):    at com.heeere.android.dnssdtuto.DnssdDiscovery$1.run(DnssdDiscovery.java:27)
09-05 13:56:49.926: E/AndroidRuntime(13243):    at android.os.Handler.handleCallback(Handler.java:587)
09-05 13:56:49.926: E/AndroidRuntime(13243):    at android.os.Handler.dispatchMessage(Handler.java:92)
09-05 13:56:49.926: E/AndroidRuntime(13243):    at android.os.Looper.loop(Looper.java:123)
09-05 13:56:49.926: E/AndroidRuntime(13243):    at android.app.ActivityThread.main(ActivityThread.java:4363)

Java code:

package com.heeere.android.dnssdtuto;

import java.io.IOException;

import javax.jmdns.JmDNS;
import javax.jmdns.ServiceEvent;
import javax.jmdns.ServiceInfo;
import javax.jmdns.ServiceListener;

import android.app.Activity;
import android.os.Bundle;
import android.widget.TextView;

public class DnssdDiscovery extends Activity {

    android.net.wifi.WifiManager.MulticastLock lock;
    android.os.Handler handler = new android.os.Handler();

    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);

        handler.postDelayed(new Runnable() {
            public void run() {
                setUp();
            }
            }, 1000);

    }    /** Called when the activity is first created. */


    private String type = "_workspace._tcp.local.";
    private JmDNS jmdns = null;
    private ServiceListener listener = null;
    private ServiceInfo serviceInfo;
    private void setUp() {
        android.net.wifi.WifiManager wifi = (android.net.wifi.WifiManager) getSystemService(android.content.Context.WIFI_SERVICE);
        lock = wifi.createMulticastLock("mylockthereturn");
        lock.setReferenceCounted(true);
        lock.acquire();
        try {
            jmdns = JmDNS.create();
            jmdns.addServiceListener(type, listener = new ServiceListener() {

                public void serviceResolved(ServiceEvent ev) {
                    notifyUser("Service resolved: " + ev.getInfo().getQualifiedName() + " port:" + ev.getInfo().getPort());
                }

                public void serviceRemoved(ServiceEvent ev) {
                    notifyUser("Service removed: " + ev.getName());
                }

                public void serviceAdded(ServiceEvent event) {
                    // Required to force serviceResolved to be called again (after the first search)
                    jmdns.requestServiceInfo(event.getType(), event.getName(), 1);
                }
            });
            serviceInfo = ServiceInfo.create("_test._tcp.local.", "AndroidTest", 0, "plain test service from android");
            jmdns.registerService(serviceInfo);
        } catch (IOException e) {
            e.printStackTrace();
            return;
        }
    }


    private void notifyUser(final String msg) {
        handler.postDelayed(new Runnable() {
            public void run() {

        TextView t = (TextView)findViewById(R.id.text);
        t.setText(msg+"\n=== "+t.getText());
            }
            }, 1);

    }

    @Override
        protected void onStart() {
        super.onStart();
        //new Thread(){public void run() {setUp();}}.start();
    }

    @Override
        protected void onStop() {
        if (jmdns != null) {
            if (listener != null) {
                jmdns.removeServiceListener(type, listener);
                listener = null;
            }
            jmdns.unregisterAllServices();
            try {
                jmdns.close();
            } catch (IOException e) {
                // TODO Auto-generated catch block
                e.printStackTrace();
            }
            jmdns = null;
        }
        //repo.stop();
        //s.stop();
        lock.release();
        super.onStop();
    }
}

AndroidManifest.xml

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
      package="com.heeere.android.dnssdtuto"
      android:versionCode="1"
      android:versionName="1.0">
    <application android:icon="@drawable/icon" android:label="@string/app_name">
        <activity android:name=".DnssdDiscovery"
                  android:label="@string/app_name">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>

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

</manifest> 
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T22:26:37+00:00Added an answer on June 10, 2026 at 10:26 pm

    The author of the Jmdns example site, published a new example of Jmdns that works without problem. I have tested with the Jmdns 3.4.1 from Maven Central Repository and It works

    this link is the new example of Jmdns

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've been looking at this apple document: http://developer.apple.com/library/mac/#documentation/UserExperience/Conceptual/AppleHIGuidelines/Controls/Controls.html In the Window-Frame Controls section it
I've been looking at aurioTouch 2 from Apple' sample code ( found here ).
I'm looking to re-create the Apple Store shopping cart sidebar. http://store.apple.com/us/configure/MB535LL/A?mco=MTA4MTg3NTQ It is similar
I am looking at the 'Metronome' sample code from the iOS SDK ( http://developer.apple.com/library/ios/#samplecode/Metronome/Introduction/Intro.html
When looking at a listing for eBay, for example: http://catalog.ebay.com/Apple-iPod-classic-5th-Generation-Black-30-GB-/60655662?_pcatid=39&_refkw=ipod&_trkparms=65%253A12%257C66%253A2%257C39%253A1%257C72%253A4030&_trksid=p3286.c0.m14 The Price Trends chart
In looking at one of Apple's examples, in the TableViewController.m, they have this: //
I was looking into Apple Mail.App plugin development and I found nothing in regards
I'm looking at Apple's MVC Networking sample project and I have found that in
I'm looking at apple's example code for application tests, and it all involves changes
I've been looking for this information through Apple documents, but could not find the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.