如何在 Android 应用程序内检查 wifi 网络是否受到浏览器密码检查的保护?

发布于 2024-12-20 20:43:24 字数 53 浏览 4 评论 0原文

是否可以通过 Android 应用程序内的浏览器密码检查来检查 wifi 网络是否受到保护?

Is is possible to check if wifi network is protected with browser password check inside Android application?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

动次打次papapa 2024-12-27 20:43:25

HttpURLConnection 的文档中:

某些 Wi-Fi 网络会阻止 Internet 访问,直到用户单击登录页面为止。此类登录页面通常通过使用 HTTP 重定向来呈现。您可以使用 getURL() 来测试您的连接是否已意外重定向。此检查只有在收到响应标头后才有效,您可以通过调用 getHeaderFields() 或 getInputStream() 来触发此检查。

From the documentation for HttpURLConnection:

Some Wi-Fi networks block Internet access until the user clicks through a sign-on page. Such sign-on pages are typically presented by using HTTP redirects. You can use getURL() to test if your connection has been unexpectedly redirected. This check is not valid until after the response headers have been received, which you can trigger by calling getHeaderFields() or getInputStream().

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文