getting phone number of android device
<p>I'm trying to get the phone number from android device using TelephonyManager.</p>

<p>what is READ_PHONE_STATE? I included it in the manifest file. but still it is throwing exception.</p>

<p>Manifest file,</p>

<pre><code>&lt;manifest xmlns:android="http://schemas.android.com/apk/res/android"
  package="abc.sample"
  android:versionCode="1"
  android:versionName="1.0"&gt;
&lt;uses-sdk android:minSdkVersion="7"/&gt;
&lt;uses-permission android:name="android.permission.INTERNET" /&gt;
&lt;uses-permission android:name="android.permission.READ_PHONE_STATE"&gt;&lt;/uses-permission&gt;
&lt;uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED"&gt;&lt;/uses-permission&gt;

&lt;application android:icon="@drawable/icon" android:label="@string/app_name" android:debuggable="true" android:permission="android.permission.READ_PHONE_STATE"&gt;
    &lt;activity android:name=".TrakkitActivityMain"
              android:label="@string/app_name"&gt;
        &lt;intent-filter&gt;
            &lt;action android:name="android.intent.action.MAIN" /&gt;
            &lt;category android:name="android.intent.category.LAUNCHER" /&gt;
        &lt;/intent-filter&gt;
    &lt;/activity&gt;
    &lt;activity android:name=".TermsOfServiceActivity" android:label="Terms Of Service"&gt;&lt;/activity&gt;
    &lt;activity android:name=".CategoryMainActivity"&gt;&lt;/activity&gt;
    &lt;activity android:name=".ExpensesMainActivity"&gt;&lt;/activity&gt;
    &lt;activity android:name=".CategoryDefineActivity"&gt;&lt;/activity&gt;
    &lt;activity android:name=".ExpensesDefineActivity"&gt;&lt;/activity&gt;
    &lt;activity android:name=".CategoryPieChartActivity"&gt;&lt;/activity&gt;&lt;receiver android:name=".receivers.AlarmReceiver"&gt;&lt;/receiver&gt;
    &lt;activity android:name=".ChartDisplayViewActivity"&gt;&lt;/activity&gt;
    &lt;activity android:name=".LandingPageActivity"&gt;&lt;/activity&gt;
    &lt;activity android:name=".SpeedOMeterViewActivity"&gt;&lt;/activity&gt;
    &lt;activity android:name=".FeedbackActivity"&gt;&lt;/activity&gt;
    &lt;activity android:name=".CategoryDeleteActivity"&gt;&lt;/activity&gt;


&lt;/application&gt;
</code></pre>

<p></p>

<pre><code>TelephonyManager telephonyManager = (TelephonyManager) context
            .getSystemService(Context.TELEPHONY_SERVICE);
    String phoneNo = telephonyManager.getLine1Number();
</code></pre>

<p>it is returning empty phoneNo=""</p>
