title: Custom Account Type with Android AccountManager
body: <p>I have an account type "mypackage.account" and a content authority "mypackage". I have a <code>Service</code> that provides an implementation of <code>AbstractAccountAuthenticator</code>, the <code>addAccount</code> method is implemented like this:</p>
  
  <pre><code>    /**
       * The user has requested to add a new account to the system. We return an intent that will launch our login
       * screen if the user has not logged in yet, otherwise our activity will just pass the user's credentials on to
       * the account manager.
       */
      @Override
      public Bundle addAccount(AccountAuthenticatorResponse response, String account_type, String auth_token_type,
                               String[] required_features, Bundle options) throws NetworkErrorException {
          final Intent intent = new Intent(_context, ConnectAccountActivity.class);
          intent.putExtra(AccountManager.KEY_ACCOUNT_AUTHENTICATOR_RESPONSE, response);
          final Bundle reply = new Bundle();
          reply.putParcelable(AccountManager.KEY_INTENT, intent);
  
          return reply;
      }
  </code></pre>
  
  <p>I provide an <code>authenticator.xml</code></p>
  
  <pre><code>&lt;account-authenticator xmlns:android="http://schemas.android.com/apk/res/android"
                     android:accountType="mypackage.account"
                     android:icon="@drawable/ic_launcher"
                     android:smallIcon="@drawable/ic_launcher"
                     android:label="@string/app_name"
                     android:accountPreferences="@xml/account_preferences" /&gt;
  </code></pre>
  
  <p>and I define this <code>Service</code> in <code>AndroidManifest.xml</code> like this:</p>
  
  <pre><code>&lt;!-- Account authentication service that provides the methods for authenticating KeepandShare accounts to the
       AccountManager framework --&gt;
  &lt;service android:exported="true" android:name=".authenticator.AccountAuthenticatorService" android:process=":auth" tools:ignore="ExportedService"&gt;
      &lt;intent-filter&gt;
          &lt;action android:name="android.accounts.AccountAuthenticator"/&gt;
      &lt;/intent-filter&gt;
      &lt;meta-data android:name="android.accounts.AccountAuthenticator" android:resource="@xml/authenticator"/&gt;
  &lt;/service&gt;
  </code></pre>
  
  <p>That's the setup, now when I want to have a screen with the list of my account type accounts on the device with an action to add a new account, I have the add account action that looks like this:</p>
  
  <pre><code>final Intent intent = new Intent(Settings.ACTION_ADD_ACCOUNT);
  intent.putExtra(Settings.EXTRA_AUTHORITIES, new String[]{ "mypackage" });
  startActivity(intent);
  </code></pre>
  
  <p>At this point I'm led to an account type picker that shows "mypackage.account" and "anotherpackage.account" as options. ("anotherpackage.account" is defined in another app I work on) This doesn't seem to be like the intended behavior. I've checked about 20 times that the authorities defined by both apps are different - and they are. Can someone show me what I'm missing?</p>