Android M permission of the tested READ_PHONE_STATE(dangerous permissions)
<p>If the device is running Android 6.0 or higher when im trying to get phone number using <strong>getLine1Number()</strong>:</p>

<p><em>java.lang.SecurityException: Requires READ_PHONE_STATE: Neither user 10184 nor current process has android.permission.READ_PHONE_STATE.</em>
This is coming out.</p>

<p>I declared permission as :</p>

<pre><code>&lt;uses-permission android:name="android.permission.READ_PHONE_STATE" /&gt;
</code></pre>