问题
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.
回答1:
Have you tried it on different phones/with different sim cards?
According to TelephonyManager.getLine1Number() returns Null
Hi All,
Here comes an explanation for this. It is not actually an issue, both information depends on some fields on the SIM card that are optional. So it might be empty if the SIM has no such optional fields or if the operator has set it empty.
Regards,
He is talking about
TelephonyManager.getLine1Number()
TelephonyManager.getSimOperatorName()
来源:https://stackoverflow.com/questions/6570751/knowing-the-network-operator-name