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

查看:164
本文介绍了如何检查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的:你可以实现自己的<一href="http://developer.android.com/reference/org/apache/http/client/RedirectHandler.html">RedirectHandler然后用它在<一个href="http://developer.android.com/reference/org/apache/http/impl/client/AbstractHttpClient.html#setRedirectHandler%28org.apache.http.client.RedirectHandler%29">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这可能不是必要的,因为iPhone已经检测到了围墙花园的Wi-Fi接入点,一旦用户连接到他们,并展示了浏览器。如果用户无法连接到互联网,在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天全站免登陆