java - How to get WI-FI signal strength in percantage from Scan Network? -
i need scan wifi networks.
how can getrssi()
of wifi scan network (not of connection wi-fi network)
int level = wifimanager.calculatesignallevel(wifi.getconnectioninfo().getrssi(), results.get(i).level); int difference = level * 100 / results.get(i).level;
ok try find signal strength
wifimanager manager; manager = (wifimanager) getsystemservice(wifi_service); list<scanresult> results = manager.getscanresults(); int level = getpowerpercentage(results.get(0).level);//0 first scan result , on.
method find signal stength
public int getpowerpercentage(int power) { int = 0; int min_dbm = -100; if (power <= min_dbm) { = 0; } else { = 100 + power; } return i; }
hope ll you.
Comments
Post a Comment