title: Cannot get AuthToken for custom account from different app
body: <p>I have two apps that work with a same account type. I want below page to be shown when the user opens the second app for first time and one account exists:</p>
  
  <p><a href="https://i.stack.imgur.com/Q0YAW.png" rel="noreferrer"><img src="https://i.stack.imgur.com/Q0YAW.png" alt="enter image description here"></a></p>
  
  <p>But nothing happens when I run this code:</p>
  
  <pre><code>final AccountManagerFuture&lt;Bundle&gt; future = mAccountManager.getAuthToken(account, authTokenType, null, this, null, null);
  
  new Thread(new Runnable() {
      @Override
      public void run() {
          try {
              Bundle bnd = future.getResult();
  
              final String authtoken = bnd.getString(AccountManager.KEY_AUTHTOKEN);
              showMessage((authtoken != null) ? "SUCCESS!\ntoken: " + authtoken : "FAIL");
              Log.d("udinic", "GetToken Bundle is " + bnd);
          } catch (Exception e) {
              e.printStackTrace();
              showMessage(e.getMessage());
          }
      }
  }).start();
  </code></pre>
  
  <p>The above code works correctly when I run it from the app that has the authenticator. When I run below code instead, system generates a notification that when I click on it, the above picture appears.</p>
  
  <pre><code>final AccountManagerFuture&lt;Bundle&gt; future = mAccountManager
          .getAuthToken(account, authTokenType, null, true,
                  null, handler);
  </code></pre>
  
  <p>Clicking allow button returns the <code>AuthToken</code> correctly. However I want to see the grant permission page (above picture) when calling <code>getAuthToken</code>, not by clicking on notification. How can I do that?</p>