jmdns

Xamarin.Android JmDNS binding issues

。_饼干妹妹 提交于 2021-02-18 22:31:27
问题 I started work on a JmDNS bindings for Xamarin.Android. I managed to get the binding to build but I can not reference it from within my code. https://github.com/ytn3rd/monodroid-bindings/tree/master/JmDNS First issue I had was there was no IDNSListener class to reference. So I added a partial interface in there for it. I have the function it needs void updateRecord(DNSCache dnsCache, long now, DNSEntry record); commented out as it would complain on not being able to reference DNSCache or

JmDNS service discovery in client-server

戏子无情 提交于 2019-12-30 00:44:34
问题 I'm trying to enable service discovery in my client-server application using JmDNS. I fully understand service registry on the server side, with code that resembles this: JmDNS jmdns = JmDNS.create(localhost); jmdns.register(serviceInfo); However, I'm having trouble figuring out how to have my client retrieve the port number and IP address from the registered service and use this data to open a TCP connection. I've searched for examples of how to use JmDNS but to no avail. Can anyone here

Android Exception: 'java.lang.NoClassDefFoundError: javax.jmdns.JmDNS'

纵饮孤独 提交于 2019-12-29 08:58:12
问题 Hopefully my issue isn't too silly but I'm having the following problem... I'm importing a jar which contains the library JmDNS into my project. My project sets up to handle JmDNS like this... setUp(); try { peer = new PublicPeer("Aidan",6666,6667,this); } catch (IOException e) { // TODO Auto-generated catch block e.printStackTrace(); } private void setUp(){ android.net.wifi.WifiManager wifi = (android.net.wifi.WifiManager) getSystemService(android.content.Context.WIFI_SERVICE); lock = wifi

Application going into ANR mode

徘徊边缘 提交于 2019-12-23 04:40:26
问题 When the users presses the back button in my application. Here is the scenario: User starts the application - Activity shows up User presses back button User re-starts the application. At this point application just shows a blank screen, none of the buttons(home/back) respond, after some time Force-close dialog comes up. NOTE: If the user presses "Home" and then relaunches the app, this doesn't happen, only if the user presses "Back" and then relaunches it. In my onCreate() I have some

android resolve .local (mDNS)

社会主义新天地 提交于 2019-12-21 19:52:51
问题 I'm looking for a solution to resolve .local host names with Android 4.0.4 (no NSD, due to API level 15). On the device I don't have any service to discover, just the hostname. Could you please provide an example how to resolve? I integrated the jmDNS, but don't know how to use for host name resolving. win-cmd: ping kcmeasurement.local Pinging kcmeasurement.local [10.202.0.29] with 32 bytes of data: Reply from 10.202.0.29: bytes=32 time<1ms TTL=64 ... Thank you, Daniel 回答1: I had almost the

Samples with JmDNS

人走茶凉 提交于 2019-12-21 02:01:38
问题 I've been able to get the samples that come with JmDNS to compile and run, however I can't get any of the classes to discover my services. I'm running a Windows environment with multiple PC's running VNC, SSH & Apache and I've been trying to get JmDNS to discover at least one of these... What I ideally want is to be able to detect all running VNC servers on my network. Is there some sort of client and server pairing where I can only discover a service if I've registered it using JmDNS? Any

Samples with JmDNS

守給你的承諾、 提交于 2019-12-21 02:01:08
问题 I've been able to get the samples that come with JmDNS to compile and run, however I can't get any of the classes to discover my services. I'm running a Windows environment with multiple PC's running VNC, SSH & Apache and I've been trying to get JmDNS to discover at least one of these... What I ideally want is to be able to detect all running VNC servers on my network. Is there some sort of client and server pairing where I can only discover a service if I've registered it using JmDNS? Any

Performing long running operation in onDestroy

*爱你&永不变心* 提交于 2019-12-19 19:46:38
问题 I have a "long-running" cleanup operation that I need to perform in onDestroy() of my Activity . What is the best way to do this? If I use a Thread to do this, my onDestroy() will return immediately; but what happens to the Thread reference? I am looking for advice on any implications/gotchas/trip-wires that I need to be aware of here since I assume that the process will still be alive even after the Activity is destroyed. Background: I am using JmDNS in my app. When the user is done with my

Android - jmdns doesn't discover devices

若如初见. 提交于 2019-12-12 07:09:22
问题 I'm trying to implement a class to discover services on the network. I've tried working with Android's NSD and it does discover the services fine, but it supports only API levels 16 and up, and I can't seem to retrieve the txtRecord field within the service info (it returns null for some reason). Turns out it's a known problem... So now I'm trying to work with jmDNS, which doesn't seem to find services at all. here's my class (I'm working with the AndroidAnnotations framework) MDnsHelper:

JMDNS Service re-announce

时光总嘲笑我的痴心妄想 提交于 2019-12-11 12:58:07
问题 I am registering a service over Wifi using JMDNS. I need to reannounce it periodically. I have checked ServiceInfo#setText(final byte [] text) ServiceInfo#setText(final Map) and, both didn't worked for me. Is there any other workaround to do same? 来源: https://stackoverflow.com/questions/23102899/jmdns-service-re-announce