Skip to content Skip to sidebar Skip to footer

Communication Between Java Server And Android Client Using Network Service Discovery

I'm building a Java server application (running on a pc) that register itself to the local network using JmDNS, and an Android client App that should discover the java server using

Solution 1:

You are calling jmdns.close() right after registering. Your service is only discoverable as long as you have jmdns open. You should remove that call to close, make your jmdns variable a member of your class, and then only call close on it when you don't want your services to be discoverable anymore. Also, it is good form to call unregisterAllServices() before closing jmdns.


Post a Comment for "Communication Between Java Server And Android Client Using Network Service Discovery"