简体   繁体   English

android 中的自适应比特率

[英]adaptive bitrate in android

In my android application, I would like to shift from 2G or 3G depending on the bitrate available.在我的 android 应用程序中,我想根据可用的比特率从 2G 或 3G 切换。 Is there any method that I can get the bitrate in Android?有什么方法可以获取 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. Android(或任何其他设备)无法为您提供您的.network 的可用比特率,因为这取决于.network 的类型、其配置、饱和度和其他环境条件。

However you can get a type of.network and devise typical speeds from this.但是,您可以从中获得 .network 类型和 devise 典型速度。 Use ConnectivityManager.getActiveNetworkInfo().getType() and getSybType() .使用ConnectivityManager.getActiveNetworkInfo().getType()getSybType()

getType() gives you ConnectivityManager.TYPE_MOBILE , etc.. getType()为您提供ConnectivityManager.TYPE_MOBILE等。

getSybType() gives you TelephonyManager.NETWORK_TYPE_GPRS , etc getSybType()给你TelephonyManager.NETWORK_TYPE_GPRS

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM