Read phone number from Android Device in Eclipse

Jarvis Source

I wanted to read the phone number of the sim card that is inserted into the android phone in Eclipse for my project. I have tried the Telephone Manager Class but since it reads the device phone number, in most of the devices its unknown and so the string retrieved using getLine1Number() of TelephoneManager class would be unknown or null.

Is there any other way or workaround that can be done in order to read the phone number from the sim be it any API or changing the phone number in device information in about phone menu in the Android Phone.

androideclipsephone-numbertelephonymanagersim-card

Answers

answered 4 months ago user8967241 #1

Their is no API for retrieving the phone number of the user until he enters his number in the sim management .

comments powered by Disqus