Вопрос

I am developing a small android application in that i want find the mobile phone number used in the particular phone

I tried the following

TelephonyManager tMgr =(TelephonyManager)this.getSystemService(Context.TELEPHONY_SERVICE);
String mPhoneNumber = tMgr.getLine1Number();

It is working fine in Emulator but It is not working in my phone

please help me anyone how to do that

Нет правильного решения

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top