我如何才能以编程方式了解互联网的我的下载和上传速度的android [英] How I get to know my downloading and uploading speed of internet programmatically in android

查看:253
本文介绍了我如何才能以编程方式了解互联网的我的下载和上传速度的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:-

<一个href=\"http://stackoverflow.com/questions/8252656/how-to-get-download-speed-in-android-device-or-mobile\">How获取下载速度在Android设备或移动

以下是演示code: -

below is demo code:-

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

这篇关于我如何才能以编程方式了解互联网的我的下载和上传速度的android的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆