title: Request scopes with GoogleSignInOptions for Tasks API
body: <p>I've achieved to set up a Google Sign In in my Android application. According to Google Developers, requesting the scope for an API should be as easy as:</p>
  
  <pre><code>if (!GoogleSignIn.hasPermissions(
          GoogleSignIn.getLastSignedInAccount(getActivity()),
          TasksScopes.TASKS)) {
      GoogleSignIn.requestPermissions(
              MyExampleActivity.this,
              RC_REQUEST_PERMISSION_SUCCESS_CONTINUE_FILE_CREATION,
              GoogleSignIn.getLastSignedInAccount(getActivity()),
              TasksScopes.TASKS);
  } else {
      saveToDriveAppFolder();
  }
  </code></pre>
  
  <blockquote>
    <p>"...call GoogleSignIn.requestPermissions to launch an activity that requests the additional required scopes from the user." <a href="https://developers.google.com/identity/sign-in/android/additional-scopes" rel="nofollow noreferrer">https://developers.google.com/identity/sign-in/android/additional-scopes</a></p>
  </blockquote>
  
  <p>or </p>
  
  <pre><code>GoogleSignInOptions gso = new GoogleSignInOptions.Builder(GoogleSignInOptions.DEFAULT_SIGN_IN)
                  .requestEmail()
                  .requestScopes(TasksScopes.TASKS)
                  .build();
  </code></pre>
  
  <blockquote>
    <p>If you need to request additional scopes to access Google APIs,
    specify them with requestScopes <a href="https://developers.google.com/identity/sign-in/android/additional-scopes" rel="nofollow noreferrer">https://developers.google.com/identity/sign-in/android/additional-scopes</a></p>
  </blockquote>
  
  <p>However, with <a href="https://developers.google.com/tasks/auth" rel="nofollow noreferrer">Tasks API</a>, the error "requestScopes in Builder cannot be applies to java.lang.String" appears.</p>
  
  <p>I've also tried to replicate this <a href="https://github.com/google/google-api-java-client-samples/tree/master/tasks-android-sample/src/main/java/com/google/api/services/samples/tasks/android" rel="nofollow noreferrer">sample piece of code</a></p>
  
  <p>P.S. The rest of Google Sign-in funtionality works properly.</p>