Android, how to measure wifi / 2G / 3G upload / download speed ...?

I searched on Google but did not find any tutorial for measuring android wifi/2G/3G speed.

In search of a lot, the download speed for IT finally appeared, anyone has the idea of ​​download speed.

any one of them will help me, is there an API or tutorial for this? Any help would be appreciated.

Thanks at Advance.

+4
source share
3 answers

You must follow your own speed measurement procedures. Here you will find a description of the Ookla speedtest algorithm: http://wiki.ookla.com/lq_test_flow

Basically, you need to load and load routines and measure the load and download times. You can use System.nanoTime () for more accurate timestamps.

0
source

A very simple general method that does not require special tools:

Upload / upload a file with a known size to a server (you can use dropbox, etc. if you don’t have your own server) and measure the time spent using CountDownTimer .

Then you can easily calculate the speed using the collected data.

0
source

You can read /proc/net/dev for network traffic statistics. On my phone, it looks like this:

 Inter-| Receive | Transmit face |bytes packets errs drop fifo frame compressed multicast|bytes packets errs drop fifo colls carrier compressed lo: 562 8 0 0 0 0 0 0 562 8 0 0 0 0 0 0 dummy0: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 rmnet0: 38329 220 0 0 0 0 0 0 33316 310 0 0 0 0 0 

......

I am using a 2G network that is visible from the rmnet0 interface. You can analyze the contents of the file and get information about the speed in the network.

I want this to help.

0
source

All Articles