In my android application, I would like to shift from 2G or 3G depending on the bitrate available. Is there any method that I can get the bitrate in Android?
Android (or any other device) can not give you available bitrate of your.network, as this depends on the type of.network, its configuration, saturation and other environmental conditions.
However you can get a type of.network and devise typical speeds from this. Use ConnectivityManager.getActiveNetworkInfo().getType()
and getSybType()
.
getType()
gives you ConnectivityManager.TYPE_MOBILE
, etc..
getSybType()
gives you TelephonyManager.NETWORK_TYPE_GPRS
, etc
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.