从采用Android SIM卡获取MSISDNAndroid、SIM、MSISDN

2023-09-04 06:38:24 作者:不装不会死

我尝试从SIM卡采用了Android的MSISDN,我已经试过 getLine1Number()但这只是返回的MSISDN储存在我的电话信息或所有者信息secction,如果这些信息是不存储,Android将返回空值。

I'm trying to retrieve the MSISDN from the SIM using Android, I have tried getLine1Number() but this only returns the MSISDN stored in My Phone Information or Owner Information secction, if these info is not stored, Android will return a null value.

你知道任何工作围绕这个?或者是有办法得到了MSISDN从SIM卡号码( getSimSerialNumber())?

Do you know any work around from this? or is there a way to derive the MSISDN from the SIM number (getSimSerialNumber())?

等待一个坚实的回答一如既往! :)

Awaits a solid Answer as always !!! :)

推荐答案

在 MSISDN (又名手机号码)不是一个SIM卡的数据,这样你就无法恢复。 SIM卡的IMSI(国际移动Subsriber身份)被发送到HLR(归属位置寄存器),负责做好测绘的 MSISDN / IMSI 的。 移动电话运营商可以存储MSISDN在SIM卡上,如果他们想,但由于它不要求在GSM协议是不

The MSISDN (aka the mobile phone number) isn't a SIM data, so you can't retrieve it. The SIM card has an IMSI (International Mobile Subsriber Identity) that is sent to the HLR (Home Location Register) in charge of doing the mapping MSISDN/IMSI. Mobile phone operators could store the MSISDN on the SIM card if they wanted to, but since it is not required in the GSM protocol it isn't.

抱歉!

有关更多信息看这个讨论Getting电话号码也如何机器人获得MSISDN

For more info look at this discussion Getting phone number also How android get MSISDN

编辑:

要得到IMSI号码,

 TelephonyManager mTelephonyMgr = (TelephonyManager) getSystemService(Context.TELEPHONY_SERVICE);
 String imsi = mTelephonyMgr.getSubscriberId();

但也有少数手机只返回6位而不是15所以,你可以使用,

but a few handsets only return 6 digits instead of 15. So, you can use,

根据这篇文章:http://www.anddev.org/tinytut_-_getting_the_imsi_-_imei_sim-device_unique_ids-t446.html

String imei = android.os.SystemProperties.get(android.telephony.TelephonyProperties.PROPERTY_IMSI);

有关更多信息看该课题和的