telephonymanager - How to find the mobile phone number in android? -


i developing small android application in want find mobile phone number used in particular phone

i tried following

telephonymanager tmgr =(telephonymanager)this.getsystemservice(context.telephony_service); string mphonenumber = tmgr.getline1number(); 

it working fine in emulator not working in phone

please me how that

you may want @ question, there no better way, , may need ensure app has read_phone_state permission, but, sim may not returning it.

i nervous phone trying value. why need it, there may better way want.

programmatically obtain phone number of android phone


Comments

Popular posts from this blog

delphi - TJvHidDeviceController "DevicePath" always showing "\" -

Disabling Android home button for industry application -

asp.net mvc 3 - Unexpected "foreach" keyword after "@" character -