简体   繁体   English

如何在Android应用程序中检查WiFi网络是否受浏览器密码保护?

[英]How can I check if wifi network is protected with browser password check inside Android application?

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

From the documentation for HttpURLConnection : HttpURLConnection的文档中:

Some Wi-Fi networks block Internet access until the user clicks through a sign-on page. 某些Wi-Fi网络会阻止Internet访问,直到用户单击登录页面。 Such sign-on pages are typically presented by using HTTP redirects. 通常通过使用HTTP重定向来呈现此类登录页面。 You can use getURL() to test if your connection has been unexpectedly redirected. 您可以使用getURL()测试连接是否被意外重定向。 This check is not valid until after the response headers have been received, which you can trigger by calling getHeaderFields() or getInputStream(). 直到收到响应标头后,此检查才有效,您可以通过调用getHeaderFields()或getInputStream()触发响应标头。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM