adaptive bitrate in android
In my android application, I would like to shift from 2G or 3G开发者_StackOverflow 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
精彩评论