本文介绍了在Android中使用WiFi SSID阻止网站的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我怎么能阻止网站在其中通过WiFi SSID黑名单控制机器人,我的意思是,当我阻止指定SSID的Facebook则应该是实块只对SSID。
我的要求是使用SSID过滤器不同势的WiFi阻止网站。就像如果人在办公室应该有块有趣的网站,但是当涉及到已保持网站应该阻止这些网站有的黑名单另一个SSID。
解决方案
列表< WifiConfiguration> configuredNetworks = wifiManager.getConfiguredNetworks();
如果(configuredNetworks!= NULL)
{
对于(WifiConfiguration wifiConfiguration:configuredNetworks)
{
如果(wifiConfiguration.status == || WifiConfiguration.Status.ENABLED
wifiConfiguration.status == WifiConfiguration.Status.CURRENT)
{
ScanResult扫描= map.get(wifiConfiguration.SSID);
如果(扫描!= NULL)
{
//这里有当前连接的无线网络
字符串wifiName = scan.SSID;
}
}
}
}
how can i block website in android which is controlled through wifi SSID black list, i mean when i block facebook for specified SSID then it should be block facebook only for that SSID.
my requirement is to block website using SSID filter for diffrent wifi. like if person at the office there should be block entertaining sites but when it comes to another ssid which is already maintain some black list for websites it should block those websites.
解决方案
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;
}
}
}
}
这篇关于在Android中使用WiFi SSID阻止网站的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!