Creative Android Development

Noisepages: Websites for smart artists.

What Mac users call “Bonjour” is really just Apple’s brand name for Zeroconf, a network standard for automatically configuring devices on a local network. Zeroconf also happens to be the best way to get OSC clients to configure themselves without making the user jump through hoops like setting up IP addresses.

Apple actually has a cross-platform Bonjour library for the job, free and Apache-licensed and available for Java. But that library includes a lot of native code, so it’s not going to be a good choice for Android After some initial problems getting it to run on Android which I think I inadvertently caused by bringing in a wrapper class, I’ve now got this pure Java library working on Android:

http://jmdns.sourceforge.net/

(A quick search suggests that there are problems with Apple’s library — it’s certainly not being updated — and pure Java is a better tool for the job generally for something like a networking library for Java programmers! So jmDNS it is.)

jmDNS seems to be everyone’s choice at this point, so what’s really needed is … a tutorial. Now that I fixed my own stupid problem, you can look forward to that. Back on it tomorrow/this weekend. And naturally, I might as well use it with OSC and Java and desktops and Processing – because once it’s done, it’ll work all those places.

11 Responses

  1. steff

    Hi there,

    I was wondering if your jmdns implementation is still to come. I am struggling with this as well and would be very happy to see it working.

    Thanks in advance,

    steff

  2. Jens

    Hey there,
     
    how bout the promised update?
    Will it be comin some time soon?
    Would love a tutorial!
    Thanks

  3. David Green

    Me 3 – I’d love a tutorial before I sepend weeks on this problem!

  4. Allen

    Hey man, I REALLY want to see your tutorial on this one. I was starting to investigate writing my own basic client off the raw RPC, so this will save me if you can help me get it working.

  5. Rémi

    Hi,

    I wrote a simple example with code and explanations. It does not cover the full range of possible usage but still it should be useful.
    It can be found here: http://home.heeere.com/tech-androidjmdns.html

    Comments are welcome.
    Rémi

  6. Rémi

    Hi all,

    I updated my introduction page, it can still be found here: http://home.heeere.com/tech-androidjmdns.html
    Rémi

  7. christian

    hey, thanks for the tutorial!

  8. Kenji Tayama

    Is this something that makes iPhone Android bluetooth communication possible? That would be exciting!

  9. r

    that  it is . thank you  very  much.  

  10. Kashif

    Thank you very much for the code and explanation given.

  11. fvisticot

    Can you please explain how Jmdns works to detect iOS bluetooth “bonjour” services ?

Leave a Reply