有人请让我知道,我如何从android代码中检索当前的电话号码.我认为电话号码将被存储在SIM卡中.
谢谢&问候,SSuman185
TelephonyManager phoneManager = (TelephonyManager) getApplicationContext().getSystemService(Context.TELEPHONY_SERVICE); String phoneNumber = phoneManager.getLine1Number();
需要READ_PHONE_STATE权限.