是否有任何理由TrafficStats值可能除了从关机复位? [英] Is there any reason why TrafficStats values might be reset apart from on Shutdown?

查看:140
本文介绍了是否有任何理由TrafficStats值可能除了从关机复位?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的应用程序使用 TrafficStats 测量从3G连接传入的字节。出于某种原因,我跑我的朋友的三星Galaxy SII的应用程序时,它出现的值归零的一段时间后。

My app uses TrafficStats to measure the incoming bytes from the 3G connection. For some reason, when running my app on my friend's Samsung Galaxy SII, it appears that the value is reset to zero after a certain period of time.

我意识到,当设备重新启动的值返回到零,我都占了,但因为某些原因他的设备上,它只是每天做它偶尔,可能一次。

I realise that when the device is rebooted the value is returned to zero, and I have accounted for that, but for some reason on his device it just does it occasionally, possibly once per day.

使用我自己的设备(HTC Desire的)我没有这个问题。我读的应用程序是无法重设值,因此它不应该是另一个应用程序导致了问题。

Using my own device (HTC Desire) I do not have this problem. I read that apps are not able to reset the value so it shouldn't be another app causing the problem.

是否有任何理由,这可能发生吗?有没有为GALAXY SII?

Is there any reason why this might happen? Are there any known device specific quirks for the Galaxy SII?

推荐答案

即兴,这可能是三星的东西,作为的同样的问题,报道了Galaxy Tab的10.1

Off the cuff, this may be a Samsung thing, as the same problem was reported for the Galaxy Tab 10.1.

所有我可以推荐的是,至少对于这些设备,你增加采样频率,所以你最后的阅读和发生复位时高值之间的时间差越低,所以你的整体数据更为准确。或者,扔出去的发生复位读。

All that I can recommend is that, at least for these devices, you increase your sampling frequency, so the time difference between your last reading and the high value when the reset occurs is lower, so your overall data is more accurate. Or, throw out the reading that occurs with the reset.

这篇关于是否有任何理由TrafficStats值可能除了从关机复位?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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