Detecting Network Speed and Type on Android (Edge,3G)

Posted on Posted in android, Uncategorized

For better experience for users of my app I wanted to show them different UI based on their network speed, problem here is that there is no way to know what network we are currently on.

My first instinct was to use android.net.ConnectivityManager getActiveNetworkInfo() which gives us current network information, but the only thing we can find out from this is the connection type TYPE_MOBILE or TYPE_WIFI which is not very useful for my purpose.

So here is a quick tool that will try to determine network type by testing the download speed, I use threshold of 176 kbits/sec as EDGE cut of value.

Downloads

Screenshots

12 thoughts on “Detecting Network Speed and Type on Android (Edge,3G)

  1. Hey, the result is different from that of SpeedTest.net app. I put a 10M bytes file on an instance in Amazon EC2. the result of this app is at most 2.9 Mbps instead of about 5Mbps of SpeedTest.net app

  2. Hi,

    For different mobile its giving different download rate
    Why is its so?

    Please help me

  3. Can you post a code from which i can get upload speed ….plzzzz
    it would help me a lot because i stuck on my office project.

  4. APK file showing nothing but crashing after some time.
    Source code looks good. You made my day.
    Here someone is saying wifiInfo.getLinkSpeed(); but that was wrong because getLinkSpeed gives maximum capacity of your wifi link.

Leave a Reply

Your email address will not be published. Required fields are marked *