可能重复: 如何获取android的自己的手机号码
Possible Duplicate: How to fetch own mobile number in android
如何获得与SIM卡在GSM手机相关的电话号码?
How to get the telephone number associated with the SIM in a GSM phone?
试试下面的code
TelephonyManager tMgr=(TelephonyManager)mAppContext.getSystemService(Context.TELEPHONY_SERVICE);
mPhoneNumber = tMgr.getLine1Number();
和与您的XML以下权限
and with following permission in your xml
READ_PHONE_STATE
上一篇:Android的编程方式禁用自动完成/自动提示进行的EditText在模拟器模拟器、自动完成、提示、方式
下一篇:是共享preferences的Android应用程序,当用户更新应用程序中删除?应用程序、用户、preferences、Andr