title: How to get current SIM card number in Android?
body: <p>I want to know user mobile number in Android. I used this code but I'm not getting number.</p>
  
  <pre><code>TelephonyManager tm = (TelephonyManager)getSystemService(Context.TELEPHONY_SERVICE); 
          String n = tm.getLine1Number();
  </code></pre>
  
  <p>Permission:</p>
  
  <pre><code>&lt;uses-permission android:name="android.permission.READ_PHONE_STATE"/&gt;
  </code></pre>
  
  <p>Is it compulsory to save number in android mobile  <code>settings --&gt; about phone --&gt; status --&gt; myphone number</code></p>
  
  <p>Any idea on this?</p>