android - how to get the telephone number in real device -


I want to know that getting the number of devices by the telephone manager and getLine1Number (), it is workable in the analog machine , But the real device I can not get, can you tell me?

com.android.internal.telephony inlude getLine1Number (), how can the internal squares be used?

This question has been asked and how often it has been answered. The phone number (possibly) is stored on the SIM card and you can get it with the telephony manager. However, this is not reliable. On some SIM cards they do not have a phone number (in this case you will get null ) and if the user changes his phone number without swapping his SIM card, you will get his old phone number


Comments