简体   繁体   中英

Read phone number from Android Device in Eclipse

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.

在用户在sim管理中输入其电话号码之前,他们不是用于检索用户电话号码的API。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM