如何查看WiFi是否通过网页登录? [英] How to check WiFi is pass through web page login?

查看:23
本文介绍了如何查看WiFi是否通过网页登录?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要检查WiFi是否通过网页登录,但我不知道该怎么做.

I need to check WiFi is pass through web page login or not, but I don't know how to do.

所以我需要有人可以帮助我或解释如何通过网页登录连接无线网络.谢谢.

So I need someone can help me or explain how to wifi via web page login. thanks.

推荐答案

在 Android 上:您可以实现自己的 RedirectHandler 然后在 HttpClient 访问不应重定向的网站.如果您被重定向,则此接入点可能是围墙花园(无法访问互联网,无需进一步步骤).在那之后,您不太可能以编程方式简单地为用户登录,因为用户可能在任何地方并且可能需要付费才能使用互联网:酒店、飞机、咖啡店.相反,最好的做法是通过对话框通知用户他们需要执行额外的步骤才能使用他们当前连接的 Wi-Fi 接入点访问互联网,然后允许他们轻松地打开 Web 浏览器访问将触发重定向的网站,例如 www.google.com.我知道这个解决方案有效,因为我以前自己实现过.

On Android: You can implement your own RedirectHandler and then use it in an HttpClient to hit a website that should never be redirected. If you get redirected then this access point is likely a walled garden (no access to the internet, without further steps). After that you are unlikely to be able to simply log in for the user programmatically, since the user could be anywhere and may need to pay to use the internet: hotel, airplane, coffee shop. Instead the best course of action is to inform the user with a dialog that they will need to perform additional steps to reach the internet using the Wi-Fi access point they are currently connected to and then allow them to easily open the web browser to a website that will trigger the redirect such as www.google.com. I know this solution works because I've implemented it myself before.

在 iPhone 上,这可能没有必要,因为一旦用户连接到围墙花园 Wi-Fi 接入点并显示浏览器,iPhone 就会检测到这些接入点.如果用户无法连接到互联网,iPhone 会断开用户与 Wi-Fi 接入点的连接.

On iPhone this probably isn't necessary since the iPhone already detects walled garden Wi-Fi access points as soon as the user connects to them and shows the browser. If the user fails to connect to the internet the iPhone disconnects the user from the Wi-Fi access point.

这篇关于如何查看WiFi是否通过网页登录?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆