如何检查WiFi是通过网页登录?

编程入门 行业动态 更新时间:2024-10-24 20:20:14
本文介绍了如何检查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。我知道这个解决方案的工作,因为我以前实现它自己。

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. 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是通过网页登录?

本文发布于:2023-10-26 12:04:11,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1530085.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:网页   WiFi

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!