title: Android RequestMultiplePermissions not prompting for permissions with certain permission combinations?
body: <p>I'm updating an app that currently uses the <code>ACCESS_FINE_LOCATION</code> permission and with new API 30 requirements, will now require the <code>ACCESS_BACKGROUND_LOCATION</code> permission as well.</p>
  <p>While updating the app to add this permission, I'm also trying to use the new ActivityResultLauncher callback method of requesting permissions (<a href="https://developer.android.com/training/permissions/requesting#allow-system-manage-request-code" rel="nofollow noreferrer">https://developer.android.com/training/permissions/requesting#allow-system-manage-request-code</a>)</p>
  <p>This seems to work well using launching single requests along these lines:</p>
  <pre><code>ActivityResultLauncher&lt;String&gt; launcher = registerForActivityResult(
      new ActivityResultContracts.RequestPermission(), this::processPermissionResult);
  
  launcher.launch(somePermission);
  </code></pre>
  <p>However, since I need both <code>ACCESS_FINE_LOCATION</code> and <code>ACCESS_BACKGROUND_LOCATION</code> it requires some extra code to keep track of the results from multiple callbacks (since each request will generate its own callback) so that I can take appropriate action if one, both, or none of the permissions were granted.</p>
  <p>To simplify this a bit, I was looking to use the <code>RequestMultiplePermissions</code> method instead, which would conveniently give me one callback with all the results in a map:</p>
  <pre><code>ActivityResultLauncher&lt;String[]&gt; launcher = registerForActivityResult(
      new ActivityResultContracts.RequestMultiplePermissions(), this::processPermissionResult);
  
  launcher.launch(new String[] {
      Manifest.permission.ACCESS_FINE_LOCATION,
      Manifest.permission.ACCESS_BACKGROUND_LOCATION
  });
  </code></pre>
  <p>However I found that the moment I request both <code>ACCESS_FINE_LOCATION</code> and <code>ACCESS_BACKGROUND_LOCATION</code> in the same request, I am no longer prompted with either permissions dialog and the callback comes back with false for both the permissions.</p>
  <p>I can, however, make individual requests for these permissions using <code>RequestMultiplePermissions</code> by giving it an array containing a single permission, and then calling launch multiple times using the same approach as if I was using the single <code>RequestPermission</code> call, and that will work.</p>
  <p>It seems that there some conflict/interaction between the <code>ACCESS_FINE_LOCATION</code> and <code>ACCESS_BACKGROUND_LOCATION</code> permissions when it comes to <code>RequestMultiplePermissions</code>? I was able to take out <code>ACCESS_BACKGROUND_LOCATION</code> and use a different permission, like <code>WRITE_EXTERNAL_STORAGE</code>, and I would get two separate permission dialog prompts.</p>
  <p>Am I misunderstanding something about the <code>ACCESS_FINE_LOCATION</code> and <code>ACCESS_BACKGROUND_LOCATION</code> permissions? Should I not be requesting them simultaneously?</p>