Get a linked SIM phone number

How can I get the phone number associated with the SIM card for CMDA, GSM and the name of the service provider?

0
source share
2 answers

Android TelephonyManager may not return the number in all cases. He may not return the number if the Operator has not installed it. You will need to create a verification script in which you ask the user to enter a number and then send an SMS to confirm.

+4
source

Most of what you want is in the TelephonyManager class:

Android TelephonyManager

e.g. getLine1Number () returns the gsm phone number

+1
source

All Articles