简体   繁体   English

Android - 如何以编程方式跟踪应用程序的带宽使用情况

[英]Android — How to track bandwidth usage by application programmatically

I want measure bandwidth that my application used through mobile data or wifi? 我想通过移动数据或wifi使用我的应用程序使用的测量带宽?

I have seen there is a TrafficStats class from android API 8 , How can I use this in lower android API like from 4. 我已经看到有一个来自android API 8的TrafficStats类,我如何在较低的android API中使用它,如4。

Is there any class or source code that can do this? 有没有可以做到这一点的类或源代码?

any help would be appreciate. 任何帮助都会很感激。

Thanks 谢谢

How about logging how much data you send and receive to a database which you can later export? 如何记录您发送和接收的数据量,以便以后导出数据库? Or save to a file on SD card (if there is one). 或者保存到SD卡上的文件(如果有的话)。

I have seen there is a TrafficStats class from android API 8 , How can I use this in lower android API like from 4. 我已经看到有一个来自android API 8的TrafficStats类,我如何在较低的android API中使用它,如4。

You can't, sorry. 你不能,抱歉。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Android —如何按应用程序或进程跟踪带宽使用情况? - Android — How to track bandwidth usage by application or process? Android —如何按进程跟踪带宽使用情况? - Android — How to track bandwidth usage by a process? 如何在android中以编程方式跟踪应用程序使用时间? - How to track app usage time programmatically in android? Android - 如何以编程方式跟踪设备上任何正在运行的应用程序的内存使用情况? - Android - How to track the memory usage of an any running app on device programmatically? Android:如何跟踪键盘使用情况 - Android : How to track Keyboard usage 如何在Android中以编程方式发现应用程序的CPU使用率? - How can I discover CPU usage of my application in Android (programmatically)? 如何以编程方式禁用 android 中其他应用程序的网络使用? - how to disable network usage for other application in android programmatically? Android以编程方式获取每个应用程序的电池使 - Android programmatically get battery usage per application 我想跟踪有关我的android应用程序使用情况的完整信息 - I want to track complete information about the usage of my android application 跟踪Android应用使用情况 - Track Android app usage
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM