【问题标题】:Disable the Captive portal detection in android在 android 中禁用 Captive 门户检测
【发布时间】:2014-10-31 21:56:34
【问题描述】:
WifiConfiguration wc = new WifiConfiguration();
                        String ssid = result.SSID;
                        wc.SSID ="\""+ AccessPointName+"\"";
                        wc.status = WifiConfiguration.Status.ENABLED;

                        wc.allowedKeyManagement.set(WifiConfiguration.KeyMgmt.NONE);


                        int res = wifiManager.addNetwork(wc);
                        boolean x= wifiManager.enableNetwork(res, true);
                        wifiManager.reconnect();

此 ssid 使用强制门户,是否有任何配置可以阻止 android 检查强制门户。

【问题讨论】:

  • 你找到解决方案了吗,我也面临同样的问题。
  • 您好,您找到解决方案了吗?

标签: java android android-wifi wifimanager wifi


【解决方案1】:

只需在终端中以 root 身份执行以下命令:

settings put global captive_portal_server 127.0.0.1 && settings put global captive_portal_detection_enabled 0

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2020-06-24
    • 2018-10-24
    • 1970-01-01
    • 2019-01-06
    • 1970-01-01
    • 2016-01-02
    • 1970-01-01
    相关资源
    最近更新 更多