The function is documented as:
Retrieves the downstream bandwidth for this network in Kbps. This always
only refers to the estimated first hop transport bandwidth.

It is returning a guess based solely on the Radio Access Technology and is
tuned for the radio in the device.  It does not take into account the
network your attached to or any variability based on cell congestion or
signal quality issues.  This make information is somewhat inaccurate and is
mostly there as a guide so app developers don't need to know the relative
value of many RAT technologies when thinking about bandwidth.
If you had been on 1xRTT you would have gotten a much lower number.  LTE
could have offered the higher number but you were on slow LTE apparently.
This is WAI.

R


On Mon, Mar 28, 2016 at 11:08 AM, Abhishek Jain <[email protected]
> wrote:

> Hi,
>
> The android API, getLinkDownstreamBandwidthKbps returns the value 102400
> (100 MHz). When I verified the same with *#0011# command on the Samsung
> Active S5, it shows 10MHz. Please let me know if I am missing something.
>
> Below is my code snippet to retreive getLinkDownstreamBandwidthKbps.
>
> int netBw;
> ConnectivityManager conMgr = (ConnectivityManager) 
> getSystemService(Context.CONNECTIVITY_SERVICE);
> Network[] networks = conMgr.getAllNetworks();
> NetworkInfo networkInfo;
> for (Network mNetwork : networks){
>     networkInfo = conMgr.getNetworkInfo(mNetwork);
>
>     if ((networkInfo.getType() ==     ConnectivityManager.TYPE_MOBILE) && 
> (networkInfo.getState().equals(NetworkInfo.State.CONNECTED))) {
>         NetworkCapabilities capabilities = 
> conMgr.getNetworkCapabilities(mNetwork);
>         int bw = capabilities.getLinkDownstreamBandwidthKbps();
>         showMessage(networkInfo.getSubtypeName() +"downlink BW in kbps = " + 
> capabilities.getLinkDownstreamBandwidthKbps());
>         showMessage(networkInfo.getSubtypeName() +"Uplink BW in kbps = " + 
> capabilities.getLinkUpstreamBandwidthKbps());
>         break;
>     }
>
>
>     if ((networkInfo.getType() ==     ConnectivityManager.TYPE_WIFI) && 
> (networkInfo.getState().equals(NetworkInfo.State.CONNECTED))) {
>         //ConnectivityManager.setProcessDefaultNetwork(network);
>         NetworkCapabilities capabilities = 
> conMgr.getNetworkCapabilities(mNetwork);
>         int bw = capabilities.getLinkDownstreamBandwidthKbps();
>         showMessage("wifi bandwidth = " + bw/1024);
>         break;
>     }
> }
>
>
> *showMessage() is my own function to print the arguments passed to it.
>
> Regards
> Abhishek
>
> --
> You received this message because you are subscribed to the Google Groups
> "Android Developers" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to [email protected].
> Visit this group at https://groups.google.com/group/android-developers.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/android-developers/5de34511-0fa5-409e-848f-1b95ccc77303%40googlegroups.com
> <https://groups.google.com/d/msgid/android-developers/5de34511-0fa5-409e-848f-1b95ccc77303%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/android-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/android-developers/CABrF01DNxXjZYF0rsnxq0tY0X7Ddg%3DLoe4eRLLdC2eWtS3UAXw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to