Skip to content
This repository has been archived by the owner on Mar 3, 2020. It is now read-only.

Upload speed #27

Open
arianaa30 opened this issue Aug 23, 2016 · 2 comments
Open

Upload speed #27

arianaa30 opened this issue Aug 23, 2016 · 2 comments

Comments

@arianaa30
Copy link

Hi,
Nice API. Can I use it to sample upload speed as well? Actually I want to use it to profile download speed, upload speed, along with time stamp and GPS info and save to a .csv file. Does it allow me enough flexibility to do that?

@zlern2k
Copy link
Contributor

zlern2k commented Aug 23, 2016

You would need to modify DeviceBandwidthStats to read TrafficStats.getTotalTxBytes in addition to getTotalRxBytes (and store that in a separate counter). Timestamp should be obvious but GPS is out of scope of this library. Note that the strategy of this library is passive -- if your app isn't consuming data, it won't be updating any estimates.

@arianaa30
Copy link
Author

Thanks. But what do you mean of Passive? All the file upload and file download process is there, so I will only getTotalBytes and divide it by the time elapsed?!
Isn't there any simpler ways? Basically speed data are being shown on the UI. Maybe I can just store them?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants