title: Use of the checkSelfPermission in Android?
body: <p>I'm working on an app that needs multiple permissions from the user (location, external storage, camera and phone state) and if i put the requests one after the other, only one is asked to the user when i run the app, which is a problem :</p>
  
  <pre><code>if (ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED &amp;&amp; ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_COARSE_LOCATION) != PackageManager.PERMISSION_GRANTED) {
          //ask for the location permission
          ActivityCompat.requestPermissions(this, new String[]{Manifest.permission.ACCESS_COARSE_LOCATION, Manifest.permission.ACCESS_FINE_LOCATION}, 123);
  
      }
      if (ActivityCompat.checkSelfPermission(this, Manifest.permission.CAMERA) != PackageManager.PERMISSION_GRANTED) {
          //ask for the location permission
          ActivityCompat.requestPermissions(this,
                  new String[]{Manifest.permission.CAMERA}, REQUEST_CAMERA);
  
      }
      if (ContextCompat.checkSelfPermission(this, Manifest.permission.WRITE_EXTERNAL_STORAGE)
              != PackageManager.PERMISSION_GRANTED
              || ContextCompat.checkSelfPermission(this, Manifest.permission.READ_EXTERNAL_STORAGE)
              != PackageManager.PERMISSION_GRANTED) {
  
          ActivityCompat.requestPermissions(this,
                  PERMISSION_EXTERNAL, REQUEST_EXTERNAL_STORAGE);
      }
  
      if (ContextCompat.checkSelfPermission(this, Manifest.permission.READ_PHONE_STATE)!= PackageManager.PERMISSION_GRANTED)
      {
          ActivityCompat.requestPermissions(this, new String[]{Manifest.permission.READ_PHONE_STATE}, REQUEST_PHONE_STATE);
      }
  </code></pre>
  
  <p>Having multiple test to create a string with all the permission requests needed being quite annoying to do, i tried just asking for the permissions without testing if they are granted with the checkSelfPermision method:</p>
  
  <pre><code>ActivityCompat.requestPermissions(this,
              new String[]{Manifest.permission.ACCESS_COARSE_LOCATION, Manifest.permission.ACCESS_FINE_LOCATION,Manifest.permission.CAMERA,Manifest.permission.WRITE_EXTERNAL_STORAGE, Manifest.permission.READ_EXTERNAL_STORAGE,Manifest.permission.READ_PHONE_STATE}, REQUEST_MULTIPLE);
  </code></pre>
  
  <p>And it works, it stacks all the different requests one after the other, if i rerun the app it doesn't ask again since the permissions have been granted, and if i manually remove one of the permissions, the app only asks for the one i've removed.</p>
  
  <p>So if everything works perfectly without testing with checkSelfPermission, what's the use of this method? Is there a risk I missed or am not aware of ?</p>