How to open application permission window in app settings programmatically
<p>I'm working on new permission model (Android 6.0 Marshmallow) and I wonder is there a way to open the application's permission window programmatically?</p>

<p><a href="https://i.stack.imgur.com/3ArvU.png" rel="noreferrer"><img src="https://i.stack.imgur.com/3ArvU.png" alt="app permissions"></a></p>

<p>not only application details </p>

<p><a href="https://i.stack.imgur.com/ekL3r.png" rel="noreferrer"><img src="https://i.stack.imgur.com/ekL3r.png" alt="app settings"></a></p>

<p>I managed to open the second screen using something like this</p>

<pre><code>private void goToSettings() {
    Intent myAppSettings = new Intent(Settings.ACTION_APPLICATION_DETAILS_SETTINGS, Uri.parse("package:" + getPackageName()));
    myAppSettings.addCategory(Intent.CATEGORY_DEFAULT);
    myAppSettings.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
    startActivity(myAppSettings);
}
</code></pre>

<p>But I have no idea how to open the first one.</p>

<p>Your help will be much appreciated :)</p>