开发者

adaptive bitrate in android

开发者 https://www.devze.com 2023-01-25 19:02 出处:网络
In my android application, I would like to shift from 2G or 3G开发者_StackOverflow depending on the bitrate available.

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

0

精彩评论

暂无评论...
验证码 换一张
取 消