Ionic android ask for location permission
<p><strong>What I'd like to accomplish:</strong><br>
If the user's location service is preventing me from getting his/her phone's location by default I'd like to ask for location permission on every API between 16-25 (Android 4.1.2-7.1.1)<br>
Since on iOS I haven't met this problem I'd like to focus on android. <br><br>
<strong>What I've already tried:<br></strong></p>

<ul>
<li><code>&lt;uses-permission android:name="android.premission.ACCESS_COARSE_LOCATION" /&gt;</code></li>
<li><code>&lt;uses-permission android:name="android.premission.ACCESS_FINE_LOCATION" /&gt;</code></li>
<li><a href="https://www.npmjs.com/package/cordova-plugin-android-permissions" rel="nofollow">cordova-plugin-android-premissions</a> <br></li>
</ul>

<p>The plugin mentioned above always returns with <code>hasPermission: true</code> even if the access to location is denied on the device so it's not working for me. <br><br>
<strong>What I haven't tried yet:</strong> <br></p>

<ul>
<li><a href="https://github.com/dpa99c/cordova-diagnostic-plugin" rel="nofollow">cordova-diagnostic-plugin</a></li>
</ul>

<p>Diagnostic plugin description says that I have choose between API 23 and above or API 22 and below in my understanding. (<code>&lt;preference name="android-targetSdkVersion" value="22"/&gt;</code> is the minimum target version.) Yet I don't know if it would still work on lower API versions.<br><br></p>

<p><strong>My setup:</strong><br></p>

<ul>
<li>Cordova CLI: 6.2.0</li>
<li>Gulp CLI &amp; local: 3.9.1</li>
<li>Ionic Framework: 1.3.1</li>
<li>Ionic CLI: 1.7.16</li>
<li>Node: 4.2.2</li>
<li>Device android: 5.0.1</li>
<li>Desired build target: 16</li>
<li>Current build target: 22</li>
</ul>