I am developing an application that displays internet speed. like: https://play.google.com/store/apps/details?id=netspeed.pt
https://play.google.com/store/apps/details?id=com.internet.speed.meter.lite&hl=en
I have to gain WiFi speed at any moment, I used the runnable:
WifiManager wm = (WifiManager)getSystemService(Context.WIFI_SERVICE); WifiInfo wifiInfo = wm.getConnectionInfo(); .... runnable = new Runnable() { @Override public void run() { int linkSpeed = wifiInfo.getLinkSpeed(); chatHead.setText( "Speed : " + linkSpeed); handler.postDelayed(runnable,100); } }; handler.postDelayed(runnable,100);
But speed does not changes , even when downloading. I'm a little confused!
I have access to the Internet at any given moment, what can I do? Should be used from native code? Or Java code as well?
Please help me.