我试着在谷歌上搜索谷歌,但找不到答案
I tried googling in google but unable to find the answer
请问有人请让我知道,我怎么可以检索从Android code当前的电话号码。我认为电话号码将被存储在SIM卡
Will anyone please let me know, how can i retrieve the current phone number from the android code. I think phone number will be stored in the sim card.
感谢和放大器;问候, SSuman185
Thanks & Regards, SSuman185
您可以试试:
TelephonyManager phoneManager = (TelephonyManager)
getApplicationContext().getSystemService(Context.TELEPHONY_SERVICE);
String phoneNumber = phoneManager.getLine1Number();
需求 READ_PHONE_STATE
许可。
上一篇:Eclipse安装失败,原因是无效的APK文件?原因、文件、Eclipse、APK
下一篇:AudioFlinger(59):RecordThread:缓冲区溢出,当活动被暂停?缓冲区、AudioFlinger、RecordThread