title: Android addAccountExplicitly using "com.google" type
body: <p>I'm looking for the answer since the begining of the day and I still don't know what to do!
  To explain the problem:
  My application uses GTasks API. To do this, the user MUST have a google account. I have two ways to check that: </p>
  
  <ol>
  <li>I instantiate an Account manager and look for "com.google" accounts if there are no such accounts </li>
  <li>I launch a webview on which the user logs on Google and accepts to use the API.</li>
  </ol>
  
  <p>Then, I have to synchronize my application with GTask.
  From the information extracted from the webview, I tried to create a "com.google" account using the AccountManager but I always have the error "Caller UID is different...". I know that the problem should come from "account-authenticator" because the "accountType" has to be the same in the XML file and in the app but I think that's not the case because when I use a different account type, it perfectly works (but I can't obtain an authToken from GTask).</p>
  
  <p>So, here is my code:</p>
  
  <p>Authenticator.xml:</p>
  
  <pre class="lang-xml prettyprint-override"><code>&lt;account-authenticator xmlns:android="http://schemas.android.com/apk/res/android"
      android:accountType="com.google"
      android:icon="@drawable/miniicon"
      android:smallIcon="@drawable/miniicon"
      android:label="@string/app_name"
      android:accountPreferences="@xml/preferences"
   /&gt;
  </code></pre>
  
  <p>Definition of the account type:</p>
  
  <pre class="lang-java prettyprint-override"><code> public class AuthenticationService extends Service {
       public static final String ACCOUNT_TYPE = "com.google";
  </code></pre>
  
  <p>How I use it in my class:</p>
  
  <pre class="lang-java prettyprint-override"><code> AccountManager manager = AccountManager.get(activity);
  
   final Account account = new Account(login, AuthenticationService.ACCOUNT_TYPE);
   manager.addAccountExplicitly(account, password, new Bundle());
  </code></pre>
  
  <p>When I use "com.plop" or anaything else instead of "com.google", it works really fine.</p>
  
  <p>So, my two questions are:
  1. Can I use the "com.google" account type?
  2. Is that normal that I can't obtain my authToken using something else than "com.google" (knowing that the account used is still a Google account, it's just not set like that on Android) ?</p>
  
  <p>Thx in advance for your help and, please, forgive me if the answer was on the site!</p>