How to get camped network type name - Android应用如何获得Phone当前注册的网络类型

发布时间:2016-12-8 22:02:42 编辑:www.fx114.net 分享查询网我要评论
本篇文章主要介绍了"How to get camped network type name - Android应用如何获得Phone当前注册的网络类型",主要涉及到How to get camped network type name - Android应用如何获得Phone当前注册的网络类型方面的内容,对于How to get camped network type name - Android应用如何获得Phone当前注册的网络类型感兴趣的同学可以参考一下。

How to get camped network type name:"Camped network name" 应用如何获得当前modem注册的网络类型: /* * Camped network name */ public String getNetWorkType() { TelephonyManager mTelephonyManager = (TelephonyManager) getSystemService(Context.TELEPHONY_SERVICE); int mNetType = mTelephonyManager.getNetworkType(); switch (mNetType) { case TelephonyManager.NETWORK_TYPE_GPRS: mStringNet = "GPRS"; break; case TelephonyManager.NETWORK_TYPE_EDGE: mStringNet = "EDGE"; break; case TelephonyManager.NETWORK_TYPE_UMTS: mStringNet = "UMTS"; break; case TelephonyManager.NETWORK_TYPE_CDMA: mStringNet = "CDMA"; break; case TelephonyManager.NETWORK_TYPE_EVDO_0: mStringNet = "EVDO_0"; break; case TelephonyManager.NETWORK_TYPE_EVDO_A: mStringNet = "EVDO_A"; break; case TelephonyManager.NETWORK_TYPE_1xRTT: mStringNet = "1xRTT"; break; case TelephonyManager.NETWORK_TYPE_HSDPA: mStringNet = "HSDPA"; break; case TelephonyManager.NETWORK_TYPE_HSUPA: mStringNet = "HSUPA"; break; case TelephonyManager.NETWORK_TYPE_HSPA: mStringNet = "HSPA"; break; case TelephonyManager.NETWORK_TYPE_IDEN: mStringNet = "IDEN"; break; case TelephonyManager.NETWORK_TYPE_EVDO_B: mStringNet = "EVDO_B"; break; case TelephonyManager.NETWORK_TYPE_LTE: mStringNet = "LTE"; break; case TelephonyManager.NETWORK_TYPE_EHRPD: mStringNet = "EHRPD"; break; case TelephonyManager.NETWORK_TYPE_HSPAP: mStringNet = "HSPAP"; break; case TelephonyManager.NETWORK_TYPE_UNKNOWN: mStringNet = "UNKNOWN"; break; } return mStringNet; }

上一篇:[置顶] 业务规则引擎—规则池功能学习
下一篇:OCP-1Z0-052-V8.02-23题

相关文章

相关评论