如何获得Android手机的收音机类型(GSM,CDMA,WCDMA,LTE) [英] How to get the Radio type of Android phone(GSM,CDMA,WCDMA,LTE)

查看:426
本文介绍了如何获得Android手机的收音机类型(GSM,CDMA,WCDMA,LTE)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用Google地图地理定位API。在那里有一个名为radioType的字段,唯一支持的值是GSM,CDMA,WCDMA和LTE。虽然这些字段是可选的,但为了更准确的结果,我将它包含在内我试图寻找代码来找到它。但我还没有找到。我想找到android手机的广播类型。您可以使用telephonyManager获取当前的网络类型。

解决方案

final TelephonyManager telephony =(TelephonyManager)getSystemService(Context.TELEPHONY_SERVICE);

并使用以下函数获取网络类型



telephony.getNetworkType();

I am using the google maps geolocation API. There is a field in there named radioType and the only supported values are GSM,CDMA,WCDMA, and LTE. Although these field is optional, I included it for more accurate results. I tried searching for code to find this. But I haven't found any. I want to find the radio type of the android phone. Any help would be greatly appreciated.

解决方案

You can use telephonyManager to get the current network type

final TelephonyManager telephony = (TelephonyManager) getSystemService(Context.TELEPHONY_SERVICE);

and use the following function to get the network type

telephony.getNetworkType();

这篇关于如何获得Android手机的收音机类型(GSM,CDMA,WCDMA,LTE)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆