【问题标题】:Physical Web mDNS android test - advertising beacon app not displayedPhysical Web mDNS android 测试 - 广告信标应用未显示
【发布时间】:2015-08-08 00:49:07
【问题描述】:

我正在尝试在 Android 上复制 this RaspberryPI 示例

我为 android 创建了一个应用程序来使用 mDNS(jmDNS 库)宣传 URL,该应用程序运行良好,我可以使用 ZeroConf Browser app 在另一部手机上接收消息

但是当我尝试使用 Physical Web app 接收相同的消息时,没有任何反应,应用程序找不到该服务。

我认为问题出在我发送主机名和 txt 记录的方式上。

这是我的代码:

serviceInfo = ServiceInfo.create(type,
                            "www.google.github.io", 80,
                            "path=/physical-web/");

                    /*A Key value map that can be advertised with the service*/
                    serviceInfo.setText(getDeviceDetailsMap());
                    jmdns.registerService(serviceInfo);

你能帮我理解什么是错的吗?

【问题讨论】:

    标签: android web-services raspberry-pi mdns jmdns


    【解决方案1】:

    查看这些讨论: https://github.com/openhab/jmdns/issues/25 https://github.com/google/physical-web/issues/414

    简而言之,我认为这个问题是因为 url 在文本记录中,而不是在服务名称中,但是物理网络将来可能会更改所需的格式...mdns 支持仍在开发中。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2021-02-07
      • 2015-05-10
      相关资源
      最近更新 更多