I'm trying to develop an Android app to measure the upload and download speed of my network, which probably I would need to run and profile it every 2 seconds or so. SpeedTest.net
app is an ideal app working similarly, however, it is not open-source. Moreover, I would need it to be run every 2 seconds. It takes couple of seconds to finish test.
How can I do that? Currently I'm just downloading a small random .txt file found somewhere on Internet and measure size/time-to-download
as a measure of download rate. But I get weird results every time. Apparently this approach is not working.
UPDATE: download is done. Any advices on how to implement the upload speeds?