本文介绍了如何在Andriod中阻止列出的网站的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

我想开发一个应用程序来阻止列出的网站,对此我没有更多的想法,请帮助我

预先谢谢!!

Hello Guys,

I want to develop a application to block listed sites and i don''t have more idea about this please help me

Thank you in advance!!

推荐答案

List<WifiConfiguration> configuredNetworks = wifiManager.getConfiguredNetworks(); 
if(configuredNetworks != null)
{ 
    for(WifiConfiguration wifiConfiguration : configuredNetworks)
    { 
       if(wifiConfiguration.status == WifiConfiguration.Status.ENABLED || 
          wifiConfiguration.status == WifiConfiguration.Status.CURRENT)
          { 
              ScanResult scan = map.get(wifiConfiguration.SSID);
              if(scan != null)
              { 
                 // Here you have the current connected WiFi
                 String wifiName = scan.SSID;
              }
          }
    }
}



希望对您有帮助
祝你好运
快乐编码:)



Hope it help u
Best Luck
Happy Coding:)


这篇关于如何在Andriod中阻止列出的网站的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-31 17:57