问题标签 [jmdns]
For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.
android - JmDNS 在 Android 中检测网络设备
我正在使用 JmDNS API 来检测网络上连接的所有设备。
我能够检测到设备并将它们列出来。但是有一个小问题。我的应用程序正在显示仅运行 linux 的机器。
有人可以对此有所了解吗?我正在使用三星 Galaxy S2 来测试我的应用程序。
android - 创建 TCP 套接字时无法识别 Android 主机名
大家好,我已经为此苦苦挣扎了一段时间,找不到解决方案。
在java中,这段代码有效:
在android中同样不起作用。我尝试删除“.local”并在清单中添加所有必要的权限:
我也尝试在执行该代码之前添加多播锁定,但没有办法解决这个问题。
我得到以下异常:
如果我提供 ip 而不是 service 它可以工作,但我需要能够提供名称。此外,我尝试添加JmDNS将名称解析为 ip,但速度很慢,仅适用于办公室的内部服务,但我们的一些服务在网络外部,但它们仍然可以通过 java 版本访问,但不能通过 android 访问。还有什么我可以尝试的吗?非常感谢,因为我的想法已经用完了......!
编辑:我认为我的问题是由于 android 中有一个错误,它只接受FQDN,例如:myservice.company.com
android - jmdns.jar 不适用于 android 4.0 或更高版本
jMdns是一个很棒的 java 库,可以为您的 Android 应用程序提供zeroconf / bonjour功能。
我在一个项目中成功地使用了它,直到Android 4.0 Ice Cream Sandwich aka ICS
,一旦开始更频繁地使用 Android 4.0 设备,我就会面临应用程序无法正常工作。
我之前在 android 4.0 中测试过应用程序,它显示了发现设备列表,但在 android 4.0 或更高版本中它什么也没显示。
我已经在 4.1 上测试了这个演示“ https://github.com/twitwi/AndroidDnssdDemo ”,但它不起作用。
我根据“http://snctln.com/2012/08/03/jmdns-and-android-4-0/”中提到的建议编写了下面的代码
你的建议是可观的
android - 如何使用 JmDNS 在 Android 上实现 bonjour
我想使用 JmDNS lib 在 Android 上实现 bonjour:
下面是我的代码:
它仅适用于工作站类型。
其他的都没有找到。
但我尝试使用应用程序 ZeroConf Browser 可以在同一环境中找到。
我该如何修改它?
android - Android - Jmdns getPort()
在一些初始问题之后,我设法让 Jmdns 启动并运行,这发现我的 Raspberry Pi 很好地连接到了我的网络。我正在使用此页面中的示例。
但是,我并不真正了解该getPort()
功能。我假设它会返回我的 Pi 所在的端口,即 80(根据设置),但它返回的值是 9。
IP 地址是正确的,名称也是正确的,但端口似乎不正确。我误解了吗?
如果是这样,jmdns 如何从我的 pi 返回正确的端口号?
任何帮助,将不胜感激。谢谢。
java - Reregistering a service JMDNS
I have what I thought would be quite a simple problem.
I'm trying to use JmDNS to broadcast a service which I've managed to do successfully, however when the app is paused, I want to unregister a service and then on resuming the app, reregister the service.
I am however running into issues doing this. The code is below:
When I try this I get this error log which is confusing me:
Can someone explain to me what I'm doing wrong or an alternative approach. The strings I apply to the service creation are definitely valid as they are used to register a service earlier in the application.
android - android中的JmDNS UDP发现
我正在做一个网络发现演示,我想在其中发现运行 udp 服务的机器。(连接到单个 wifi)。我正在使用以下代码
主要是我不确定我使用的服务类型是否正确。1)UDP服务的服务类型是什么?2) 是否可以使用安卓设备搜索 udp 服务?3)还有其他关于这个的例子吗?
android - 如何让 JmDNS 在大型网络上工作
我正在使用(http://jmdns.sourceforge.net/)向我们的应用程序添加发现。它实际上在我的小型家庭网络上正常工作。但它在办公室的大型网络上失败了。我似乎记得读过,如果一个应用程序阻塞超过 5 秒,它就会被重置。这似乎就是正在发生的事情。但首先,我如何确定这实际上是问题所在?
当然,我的主要问题是如何让 JmDNS 在大型网络上工作。更普遍的问题是当你需要超过 5 秒时你会做什么?
我的代码的一小段(它在 AsyncTask 中):
jmdns - JmDNS : Discover the same service on Multiple devices
I am trying to use JmDNS to discover the services. I am able to discover the service using the Sample Code given at the
When I add a service listener and invoke the addServiceListener, it properly identifies the service. But, I have the same service running on more than one device. Now, I am wondering how I will be able to get the list of all the IP Address on which the service is running. I am only able to get the IP Address of one the devices.
And also what is the difference between JmDNS and JmmDNS?
android - 如何使用服务监听器
我是韩国的安卓开发者。我有一些问题,所以我进入了这个网站。我已经在网站上搜索了,但我没有解决问题。
ServiceListener 和 ServiceTypeListener 不起作用。所以我想知道解决问题。感谢任何回复。