android - 如何在 Android 浏览器地址栏中启用 mDNS 支持

标签 android google-chrome

如何在 Android Chrome 浏览器地址栏中获取 mDNS 名称 (test.local) 解析为 ip 地址?

在 Windows 中安装 Bonjour 服务后,它可以在 Chrome 浏览器中运行。有没有类似的服务可以在Android中激活。

在像 (zeroConfig) 这样的 Android 应用程序中,mDNS 解析是可能的。我读到可以使用 NSD 服务编写应用程序。但是安卓的Chrome浏览器好像没有这种支持。

我正在开发一个 Iot(物联网)Web 应用程序,mDNS 服务将使我的工作和其他像我一样的人更加轻松。

最佳答案

在这里查看答案:https://android.stackexchange.com/questions/49188/how-to-get-mdns-working-for-chrome-on-android

natevw 的回答:

I don't think so.

The system DNS resolver in Apple's platforms has in-built support for mDNS, so that pretty much any app eventually winds up using the core getaddrinfo function and supporting mDNS in URLs and hostnames and whatnot.

On Android and other platforms, even if there is a Multicast DNS daemon running and libraries available for using it, "typical" DNS lookups do not. So while recent Android releases do give developers some mDNS features as part of the platform, most do not go out of their way (as they would need to do) to use them.

It's a bummer, but AFAIK there's nothing short of rolling your own custom Android build (or convincing Google to change it) that could really solve this.

关于android - 如何在 Android 浏览器地址栏中启用 mDNS 支持,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30449988/

相关文章:

google-chrome - 使用背景大小 : cover 的 Chrome 性能不佳

javascript - 在 Chrome 中从 Javascript 开始和停止分析

android - 如何执行多个文件复制到共享集合下载,适用于 Android Q,Scoped Storage?

java - 解析 UTF-8 编码的 XML 文件

android - 没有 AJAX 的 cometd

node.js - 我为什么现在要获得“ “A data breach on a site or app exposed your password. Chrome recommends changing your password on ” SITENAME”。

html - 一行里面有很多 col-md*,对吗?

java - 动态添加时单选按钮文本颜色问题

android - 试图在 android 的 gridview 中更改字体大小

css - 背景缩放错误?