简体   繁体   English

Android:测量每个应用的GPRS使用情况

[英]Android: Measure GPRS usage per app

Does anyone know if it's possible to measure the GPRS (and the WIFI) usage on a app basis? 有谁知道是否可以根据应用测量GPRS(和WIFI)使用情况? Thanks! 谢谢!

You can use TrafficStats to measure data usage on a per-UID basis, which roughly equates to a per-app basis. 您可以使用TrafficStats以每个UID为基础来衡量数据使用情况,这大致相当于以每个应用为基础。 Note, though, that not all devices can report per-UID data with TrafficStats , and I am not completely certain why. 但是请注意,并非所有设备都可以使用TrafficStats报告每个UID数据,我还不确定原因。

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

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM