Skip to content Skip to sidebar Skip to footer

How To Get The Telephone Number In Real Device

i want to know get the number of device by telephoneManager and getLine1Number() ,it is workly well in analog machine,but in real device i donot get,could you tell me why? in the c

Solution 1:

This question has been asked and answered on SO a number of times. The phone number is (possibly) stored on the SIM-card and you can get it with TelephonyManager.getLine1Number() however, it is not reliable. Some SIM cards don't have the phone number on them (in which case you will get null) and if the user changes his phone number without swapping his SIM card then you will get his old phone number.


Post a Comment for "How To Get The Telephone Number In Real Device"