문제

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