perhaps you can find out that the user is connected to a Wi-Fi network, gprs or g3. Then you can understand how fast each technology is. You can also put the file (for example, 3 MB) on the quick connection server. Then you can download this file and measure the time, how long it takes. Then just calculate ... Or you can calculate it after every second while the file is loading.
Also, the download speed may vary depending on various conditions. Like the power of the network (wireless and mobile phone). For example, if the user is connected to 54-bit Wi-Fi and the access point is 60 meters from the user, then the download speed will not even be half that. Here is an example with load speed calculations. Java howto calculates Mbit / s during loop loading.
source share