我如何才能以编程方式了解互联网的我的下载和上传速度的android

问题描述:

我想开发它告诉我,我的下载和上传速度的应用程序,并命名该网络无论是3G,4G,WIFI或等。
同样appilcation理念发展速度一样Test.net

I want to develop an application which tells me my downloading and uploading speed and also name of the network whether it is 3G, 4G, WIFI or etc. Same appilcation idea to develop like Speed Test.net

先谢谢了。

试试下面code: -

try below code:-

WifiManager wifiManager = Context.getSystemService(Context.WIFI_SERVICE);
WifiInfo wifiInfo = wifiManager.getConnectionInfo();
if (wifiInfo != null) {
    Integer linkSpeed = wifiInfo.getLinkSpeed(); //measured using WifiInfo.LINK_SPEED_UNITS
}

见下面的链接: -

see below link:-

How获取下载速度在Android设备或移动

以下是演示code: -

below is demo code:-

http://www.gregbugaj.com/?p=47