Android M Permissions Dialog - Choose Order Displayed to User
<p>Is there a way to choose which order the user is prompted for permissions in Android Marshmellow's new permissions dialog?</p>

<p>When the user launches the camera in my app, I'm prompting for:</p>

<ul>
<li>Manifest.permission.CAMERA</li>
<li>Manifest.permission.WRITE_EXTERNAL_STORAGE</li>
<li>Manifest.permission.RECORD_AUDIO</li>
</ul>

<p>Because it makes the most sense (e.g. open camera, app requests camera permissions), I want the permissions to be requested in that order as well. But they aren't requested in that way - the Permissions dialog seems to just ignore the order I have in the String array.</p>

<p>Code below, using the <a href="https://github.com/googlesamples/easypermissions" rel="nofollow">EasyPermissions library</a>, but the same thing happens without the EasyPermissions library.</p>

<pre><code>ArrayList&lt;String&gt; permissionsToRequest = new ArrayList&lt;String&gt;();
permissionsToRequest.add(Manifest.permission.CAMERA);
permissionsToRequest.add(Manifest.permission.WRITE_EXTERNAL_STORAGE);
permissionsToRequest.add(Manifest.permission.RECORD_AUDIO);

EasyPermissions.requestPermissions(
            this,
            "To take pictures &amp; record video, we need access to your device's camera &amp; storage. Allow?",
            R.string.acceptPermission, R.string.declinePermission,
            RequestConstants.REQUEST_CAMERA_PERMISSIONS,
            permissionsToRequest.toArray(new String[0])
    );
</code></pre>

<p>Regardless of how I order the permissions in permissionsToRequest, the user is prompted in the same order (Audio, Storage, Camera), which in my opinion is the least intuitive order. Any way to fix this?</p>