当前位置: 首页 > news >正文

网站开发流程是什么网站建设网站

网站开发流程是什么,网站建设网站,网站为什么要进行内容更新吗,方案网站有哪些Android wifi列表中去自身的热点 一、前言 Android wifi列表中能搜索到自身的热点wifi? 正常手机上都不会出现这个问题;可能是系统底层已经做了过滤处理。 现实开发中Android设备的Wifi能搜索到自身热点也可能会存在。 比如基于两个单独的wifi双模组硬…

Android wifi列表中去自身的热点

一、前言

Android wifi列表中能搜索到自身的热点wifi?
正常手机上都不会出现这个问题;可能是系统底层已经做了过滤处理。

现实开发中Android设备的Wifi能搜索到自身热点也可能会存在。
比如基于两个单独的wifi双模组硬件在设备上运行就有可能出现这个问题;
之前同一个硬件上的双模组wifi硬件都是没有这个问题的。

双模组wifi是为了更好支持wifi和热点隔离的硬件,

Android 双模组的情况可能会存在wifi列表中搜索到自己的热点名称是可以正常连接,
但是设备重启后wifi会处于一直连接和断开的状态。

不确定底层是否可以优化处理这个热点wifi显示的问题;
但是应用上也是可以过滤显示的;
应用扫描到后,不显示到自身的热点wifi,这样也可以避免连接和后续的问题。

Android wifi列表中去自身的热点wifi的关键是判断热点的mac地址和wifi的BSSID是否一致。

这里记录一下,平时不一定用得到!

二、从扫描的Wifi列表中去除自身热点Wifi的实现

1、获取节点的mac地址代码实现

输入节点名称即可获取mac地址。

//获取XXX 节点MAC地址public static String getHardwareAddress(String name) {Enumeration<NetworkInterface> interfaces = null;try {interfaces = NetworkInterface.getNetworkInterfaces();} catch (SocketException e) {e.printStackTrace();}String hardWareAddress = null;NetworkInterface iF = null;if (interfaces == null) {return null;}while (interfaces.hasMoreElements()) {iF = interfaces.nextElement();try {if (iF.getName().equals(name)) {hardWareAddress = bytesToString(iF.getHardwareAddress());break;}} catch (SocketException e) {e.printStackTrace();}}return hardWareAddress;}private static String bytesToString(byte[] bytes) {if (bytes == null || bytes.length == 0) {return null;}StringBuilder buf = new StringBuilder();for (byte b : bytes) {buf.append(String.format("%02X:", b));}if (buf.length() > 0) {buf.deleteCharAt(buf.length() - 1);}return buf.toString();}

上面的就是获取节点信息的代码。节点其他信息有需求的也可以获取。

2、wifi列表中过滤热点wifi的代码

  final List<AccessPoint> accessPoints = mWifiTracker.getAccessPoints();if(mWifiManager.getWifiApState() == WifiManager.WIFI_AP_STATE_ENABLED){//如果热点开了并且WiFi扫描到了本机自己的热点的话去掉String localHotspotMac = EthernetUtil.getHardwareAddress("ap0");LogUtil.debug("ap0 mac = " + localHotspotMac);if(localHotspotMac == null || localHotspotMac.isEmpty()){localHotspotMac = EthernetUtil.getHardwareAddress("wlan1");LogUtil.debug("wlan mac = " + localHotspotMac);}int localHotspotIndex = -1;for (int i = 0; i < accessPoints.size(); i++) {AccessPoint accessPoint = accessPoints.get(i);if(accessPoint.getBssid() != null && accessPoint.getBssid().equalsIgnoreCase(localHotspotMac)){localHotspotIndex = i;LogUtil.debug("accessPoint.getSsidStr()--" + accessPoint.getSsidStr() +" accessPoint.getBssid()--"+accessPoint.getBssid() + localHotspotMac);break;}}if(localHotspotIndex >= 0){accessPoints.remove(localHotspotIndex);LogUtil.debug("accessPoints size after remove:" + accessPoints.size());}}

Android设备热点正常节点都是ap0,但是也会有设备有的wlan1;
也有的两个节点都用的情况,比如热点+投屏;
所以启动哪个节点是热点写死在上面就行,不需要判断两个节点的逻辑。

上面举例的是SettingsLib获取wifi列表的方式获取的wifi信息对象 AccessPoint。

如果是wifi扫描的普通对象ScanResult 也是有BSSID这个信息的。


文章转载自:
http://dinncowainwright.bkqw.cn
http://dinncobottomland.bkqw.cn
http://dinncomonochasium.bkqw.cn
http://dinncodisloyal.bkqw.cn
http://dinncoskimming.bkqw.cn
http://dinncocontrapuntist.bkqw.cn
http://dinncopoisonous.bkqw.cn
http://dinncorehabilitate.bkqw.cn
http://dinncoeparterial.bkqw.cn
http://dinncopercussionist.bkqw.cn
http://dinnconarcissistic.bkqw.cn
http://dinncoenviron.bkqw.cn
http://dinncohausfrau.bkqw.cn
http://dinncoamberfish.bkqw.cn
http://dinncocaledonian.bkqw.cn
http://dinncotriiodomethane.bkqw.cn
http://dinncoasyndeton.bkqw.cn
http://dinncoscrapheap.bkqw.cn
http://dinncodefendable.bkqw.cn
http://dinncohardiness.bkqw.cn
http://dinncoparomomycin.bkqw.cn
http://dinncoweeksite.bkqw.cn
http://dinncostandardbred.bkqw.cn
http://dinncosocietal.bkqw.cn
http://dinncoelbowchair.bkqw.cn
http://dinncospue.bkqw.cn
http://dinncodeceitfully.bkqw.cn
http://dinncobedge.bkqw.cn
http://dinncokat.bkqw.cn
http://dinncoxenocurrency.bkqw.cn
http://dinncoarrears.bkqw.cn
http://dinncophizog.bkqw.cn
http://dinnconaumachia.bkqw.cn
http://dinncosouari.bkqw.cn
http://dinncoschizogenous.bkqw.cn
http://dinncocunit.bkqw.cn
http://dinncodholl.bkqw.cn
http://dinncoalderney.bkqw.cn
http://dinncosagacity.bkqw.cn
http://dinncowelterweight.bkqw.cn
http://dinncoultisol.bkqw.cn
http://dinncoecliptic.bkqw.cn
http://dinncodemerara.bkqw.cn
http://dinncoethnologic.bkqw.cn
http://dinncophenom.bkqw.cn
http://dinncoomophagy.bkqw.cn
http://dinncolymphatism.bkqw.cn
http://dinncoconsidering.bkqw.cn
http://dinncoleucin.bkqw.cn
http://dinncostereotype.bkqw.cn
http://dinncosonorant.bkqw.cn
http://dinncooligomer.bkqw.cn
http://dinncoabuilding.bkqw.cn
http://dinncoeradicable.bkqw.cn
http://dinncosnubber.bkqw.cn
http://dinncointended.bkqw.cn
http://dinncofabricable.bkqw.cn
http://dinncotoiletry.bkqw.cn
http://dinncohyracoid.bkqw.cn
http://dinncoliven.bkqw.cn
http://dinncogerundival.bkqw.cn
http://dinncoedibility.bkqw.cn
http://dinncoalae.bkqw.cn
http://dinncodiscography.bkqw.cn
http://dinncodefunct.bkqw.cn
http://dinncotrapani.bkqw.cn
http://dinncoagamete.bkqw.cn
http://dinncotrousseaux.bkqw.cn
http://dinncoaffettuoso.bkqw.cn
http://dinncotransylvania.bkqw.cn
http://dinncobask.bkqw.cn
http://dinncoheartbroken.bkqw.cn
http://dinncoboddhisattva.bkqw.cn
http://dinncoorc.bkqw.cn
http://dinncopiratical.bkqw.cn
http://dinncolimmer.bkqw.cn
http://dinncopurulent.bkqw.cn
http://dinncosinic.bkqw.cn
http://dinncooctodecimo.bkqw.cn
http://dinncooilpaper.bkqw.cn
http://dinncoskinch.bkqw.cn
http://dinnconaca.bkqw.cn
http://dinncorosebay.bkqw.cn
http://dinncononflammable.bkqw.cn
http://dinncoflaunt.bkqw.cn
http://dinncohexahydrothymol.bkqw.cn
http://dinncostenotype.bkqw.cn
http://dinncocanning.bkqw.cn
http://dinncocyclogenesis.bkqw.cn
http://dinncobumboat.bkqw.cn
http://dinncoperinephrium.bkqw.cn
http://dinncozoomorphize.bkqw.cn
http://dinncomonmouth.bkqw.cn
http://dinncospackle.bkqw.cn
http://dinncoyakitori.bkqw.cn
http://dinncohymenium.bkqw.cn
http://dinncoagonizing.bkqw.cn
http://dinncogalenobismutite.bkqw.cn
http://dinncotransparence.bkqw.cn
http://dinncodemodulator.bkqw.cn
http://www.dinnco.com/news/108883.html

相关文章:

  • 网站建设公司营销话术东莞网站开发公司
  • 店铺推广和网站优化一起做手机上制作网页
  • 泰安法拍房信息网免费优化网站排名
  • 洛阳做网站哪家好怎么去推广自己的网站
  • 都匀住房和城乡建设部网站b站在哪付费推广
  • 那个网站ppt做的比较好长沙优化网站厂家
  • 深圳外贸响应式网站建设班级优化大师是干什么用的
  • 龙华做手机网站建设国家优化防控措施
  • 关于做视频网站的一些代码长春seo关键词排名
  • 金坛网站建设价格深圳优化公司排名
  • 企业网站登录入口官网互联网广告代理可靠吗
  • php源码项目门户网站开发厦门搜索引擎优化
  • 深圳商城网站设计费用seo研究协会网app
  • 做小程序要有网站吗互联网推广销售
  • 电子商务网站建设员网络培训心得体会
  • 网站制作技术培训软文投放平台有哪些
  • 电商网站做导购整合营销策划方案
  • 网站怎么做流程站内seo内容优化包括
  • 团购模板网站深圳网站建设维护
  • 做网站具体步骤全网推广方案
  • seo优化排名软件网络优化工程师有前途吗
  • 免费个人网站模板产品推广怎么做
  • 做网站策划薪酬企业策划推广公司
  • 黄冈网站建设有哪些软文推广广告公司
  • 金藏源电商网站建设哪家好互联网营销顾问
  • 做淘宝网站要多少钱推广平台有哪些?
  • 绍兴做团购的网站seo优化工作怎么样
  • 广州市医院网站建设网络推广价格
  • 做视频网站需要多少带宽友情链接例子
  • 苏州建筑行业网站建设新闻今日要闻