android - Using WifiManager.startScan() -


after wifimanager.startscan() use yields different values after every 6 seconds. how force new values of scan sooner? need new result possible, ideally every 10ms. possible somehow? @ moment, i´m using code:

wifi.startscan();     vysledek = wifi.getscanresults();     int sizelist = vysledek.size();     (int = 0; < sizelist; a++) {         // porovnani vysledku s pripojenou ssid//         if (vysledek.get(a).ssid.equalsignorecase(ssid))          {             tw5.settext(vysledek.get(a).ssid);             tw6.settext(vysledek.get(a).bssid);             tw7.settext(string.valueof(vysledek.get(a).level));             tw8.settext(string.valueof(system.currenttimemillis()));         }     }      sleep();      wifi.startscan();     vysledek = wifi.getscanresults();     sizelist = vysledek.size();     (int = 0; < sizelist; a++) {         // porovnani vysledku s pripojenou ssid//         if (vysledek.get(a).ssid.equalsignorecase(ssid))          {             tw9.settext(vysledek.get(a).ssid);             tw10.settext(vysledek.get(a).bssid);             tw11.settext(string.valueof(vysledek.get(a).level));             tw12.settext(string.valueof(system.currenttimemillis()));         }     }      sleep(); 

where sleep(); is:

public void sleep()     {         try {             thread.sleep(10);         } catch (interruptedexception e) {             e.printstacktrace();         }     } 

output is: enter image description here

as can see, call wifi.startscan(); everytime want new results gives me same results before until 6 seconds gone. after 6 seconds signal level value changes. please me :) thanks


Comments

Popular posts from this blog

matlab - "Contour not rendered for non-finite ZData" -

delphi - Indy UDP Read Contents of Adata -

javascript - Any ideas when Firefox is likely to implement lengthAdjust and textLength? -