How can I discover zeroconf (Bonjour) services on Android? I'm having trouble with jmDNS
I'm new as well otherwise I would have just left a comment on smountcastle's answer which is mostly correct. I have just been dealing with the exact same issue on a Droid running Android 2.1. I found that I needed to set the MulticastLock to reference-counted otherwise it seemed to be released automatically.
AndroidManifest.xml:
<uses-permission android:name="android.permission.CHANGE_WIFI_MULTICAST_STATE" />
// Networking code:
WifiManager wifi = getSystemService( Context.WIFI_SERVICE );
MulticastLock lock = wifi.createMulticastLock("fliing_lock");
lock.setReferenceCounted(true);
lock.acquire();
Just make sure to call lock.release()
when you're done with it. This may only be necessary for Android 2.0+, The Droid is my only test device currently, so I can't say for sure.
Android - iOS zero conf network discovery with jmDNS broken
Switching to Android's native network discovery (NsdManager) this is no longer a problem. It seems to be an incompatibility between jmDNS and iOS 8 / OS X 10.10.
Locate services using Zeroconf with JmDNS on local device AP(hotspot)
It is not possible to use multicast on a local hotspot since it's not possible to acquire the multicast lock. Thus JmDNS will not work.
For anyone else having this problem, the alternative solution of finding connected devices I ended up using is based on parsing /proc/net/arp
Related Topics
Download Images Using Android Webview
Couldn't Get Connection Factory Client - Fighting with Google Maps
Broadcast Receiver for Missed Call in Android
Textview with Background Color and Line Spacing
Update SQL Database with Contentvalues and the Update-Method
Firebase Changing Layout of Child Data Information in Android
Android/iOS - Custom Uri/Protocol Handling
Why Does Flag_Activity_Clear_Top Not Work
Stackoverflow: Caused by Nested Views
Android Studio - Cannot Resolve Symbol 'Firebase'
How to Configure Gmail in Android Emulator
Mediaplayer Stop Playing After About 5 Seconds
Android Back Button on a Progressive Web Application Closes De App
Using Collate in Android Sqlite - Locales Is Ignored in Like Statement
How to Save Image Taken from Camera and Show It to Listview - Crashes with "Illegalstateexception"