The native code that I am currently using within an Android Library project is responsible of using ZeroConf/Bonjour for discovery of endpoints in the local network. The C/C++ code works well on iOS and personal computers, however I am having hangups on getting it to work on Android. The discovery and communication from these endpoints will then be used within my application for data exchange.
I am handling the enabling of multicast through the permissions as would be expected, and have even gone as far as to enable nearly all the permissions just be sure that I wasn't leaving something out when I was testing the code.
In addition to permissions, I have created a MulticastLock as suggested by several threads and making sure that the reference counted of the lock is also set to true before delving into the native code.
What I do get for output is typically something along the lines of the following:
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
02-21 14:42:05.773: I/JNI_NDK_DEBUGGING(16763): JNI_OnLoad called
02-21 14:42:05.773: I/android_my_log(16763): mDNSResponder (Engineering Build) (Feb 18 2013 11:32:58) starting
02-21 14:42:05.773: I/android_my_log(16763): ERROR: Unable to set maximum file descriptor limit: 1 (Operation not permitted)
02-21 14:42:05.773: I/android_my_log(16763): Unable to parse DNS server list. Unicast DNS-SD unavailable
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
All of which I have followed to the source code and spent hours trying to figure out why it might be failing (uds_daemon.c PosixDaemon.c & mDNS.c throw errors). While I will be doing further research into this and these classes, I was hoping to potentially here back that something may or may not work or I might be missing something glaringly that someone could point out Attempts to search for keywords and issues with these printouts have failed thus far. So I am reaching out to the community for suggestions and comments on how to progress further.
Can I not do DNS discovery using ZeroConf libs without doing some sort of Java JDNS or something of that nature?
Perhaps access and need for file access to a network configuration on the device is not available to me?
Or any other possible oversight that I just need to correct for in order to discover properly would be great feedback.