title: No Activity found to handle Intent { act=android.accounts.AccountAuthenticator } even though I have one
body: <p>I'm trying to have my application display my login activity when a user selects <em>"Add account"</em> in <em>"Accounts&nbsp;&amp;&nbsp;Sync"</em> or wants to use the application and isn't logged in yet. I've followed the example <a href="http://developer.android.com/resources/samples/SampleSyncAdapter/index.html" rel="nofollow noreferrer">SampleSyncAdapter</a> fairly closely, but can't get it to work and receive the following exception instead:</p>
  
  <p><code>No Activity found to handle Intent { act=android.accounts.AccountAuthenticator }</code>  </p>
  
  <p>My auth service contains: </p>
  
  <pre><code>public IBinder onBind(Intent intent) {
      IBinder ret = null;
      if (intent.getAction().equals(android.accounts.AccountManager.ACTION_AUTHENTICATOR_INTENT)){
          ret = getAuthenticator().getIBinder();
      }
      return ret;
  }
  </code></pre>
  
  <p>My <code>AndroidManifest.xml</code>:</p>
  
  <pre><code>&lt;service android:name=".auth.MyAuthService"
           android:exported="true" 
           android:process=":auth"&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;
  </code></pre>
  
  <p>My main activity: </p>
  
  <pre><code>startActivity(new Intent(android.accounts.AccountManager.ACTION_AUTHENTICATOR_INTENT));
  </code></pre>
  
  <p>I've tried doing both: </p>
  
  <pre><code>Intent svc = new Intent(this, CreazaAuthService.class);
  startService(svc);
  </code></pre>
  
  <p>and: </p>
  
  <pre><code>bindService(new Intent(android.accounts.AccountManager.ACTION_AUTHENTICATOR_INTENT), null, BIND_AUTO_CREATE);
  </code></pre>
  
  <p>before the <code>startActivity()</code> call, but it still can't find an activity for that intent. If I try to add an account via accounts&amp;sync my application crashes with the same <code>ActivityNotFoundException</code>.</p>
  
  <p>What am I doing wrong? </p>
  
  <p><strong>EDIT</strong><br>
  I've examined c99's last.fm app, which defines a custom action and uses intents based on that action rather than <code>android.accounts.AccountManager.ACTION_AUTHENTICATOR_INTENT</code>. Is that a better approach? Is there a way to make it work with Accounts &amp; Sync? </p>