【发布时间】: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