知道网络运营商名称
我想在我的应用程序中获取我的网络运营商名称。
我在 TelephonyManager 中使用以下方法来获取此内容:
TelephonyManager mTeleManager = (TelephonyManager) getSystemService(TELEPHONY_SERVICE);
mTeleManager.getSimOperatorName();
mTeleManager.getNetworkOperatorName();
mTeleManager.getSimOperator()
但是我从“getSimOperatorName()”和“getNetworkOperatorName()”中获取空值。 我从这个“getSimOperator()”方法中获取数字代码,但我想知道运算符名称的字母形式。类似“T-Mobile”的 Tmobile 网络。
PL。建议我如何做到这一点。
谢谢。
I want to get my network operator name in my app.
I am using fallowing methods in the TelephonyManager to get this:
TelephonyManager mTeleManager = (TelephonyManager) getSystemService(TELEPHONY_SERVICE);
mTeleManager.getSimOperatorName();
mTeleManager.getNetworkOperatorName();
mTeleManager.getSimOperator()
But I am getting empty values from the "getSimOperatorName()" and "getNetworkOperatorName()"..
I am getting numeric code from this "getSimOperator()" method, But I want know the alphabetic form of the operator name . Some thing like "T-Mobile" for Tmobile networks.
Pl. suggest me how to do this.
thanks.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您是否在不同的手机/不同的 SIM 卡上尝试过?
根据 TelephonyManager.getLine1Number() 返回 Null
他正在谈论
Have you tried it on different phones/with different sim cards?
According to TelephonyManager.getLine1Number() returns Null
He is talking about