How to get phone numberHow to get phone number

How to get phone number in android program.

Answer 1

Call getSystemService() to get TELEPHONY_SERVICE handle.
  
        TelephonyManager tManager = (TelephonyManager) getBaseContext()
		.getSystemService(Context.TELEPHONY_SERVICE);
        
         String PhoneNumber  = tManager.getLine1Number();

SUBMIT YOUR ANSWER

  |  
 
 
 

Preview :