title: Can I retrieve the current telephone number?
body: <p>I'm writing an app for Android (2.1+), and I'd like to use the telephone number of the current phone. Lots of googling brought me the following:</p>
  
  <pre><code>String number=(TelephonyManager)getApplicationContext().getSystemService(Context.TELEPHONY_SERVICE).getLine1Number();
  </code></pre>
  
  <p>That along with permission:  READ_PHONE_STATE.</p>
  
  <p>My problem however is that it returns null. While searching, I noticed this question has been asked many times before and nearly in all of those questions it is said that the number simply isn't always available.</p>
  
  <p>While testing I found that on my very own phone it gives me null. BUT another app (for example, <a href="https://en.wikipedia.org/wiki/WhatsApp" rel="nofollow">WhatsApp</a>) was able to recognize my phone number).</p>
  
  <p>So then I wonder, how did they do it?</p>