How are Intent-Categories matched?
<p>I don't get the Android Intent matching concept! I must be missing something, but I read and re-read the docs and don't get it. Maybe some kind soul can shed some light on this? </p>

<p>I am able to start an Activity if I specify a Category filter <code>android.intent.category.DEFAULT</code> in the manifest:</p>

<pre><code>    ...
    &lt;activity 
        android:name="mmmo.android.test.ItemDetails"
        &lt;intent-filter&gt;
            &lt;action android:name="android.intent.action.INSERT" /&gt;
            &lt;category android:name="android.intent.category.DEFAULT" /&gt;
        &lt;/intent-filter&gt;
    &lt;/activity&gt;
    ...
</code></pre>

<p>and if I then don't add any Category to the Intent object:</p>

<pre><code>        ...
        Intent intent = new Intent(Intent.ACTION_INSERT);
        startActivity(intent);
        ...
</code></pre>

<p>That works. However, as soon as I define any other category than <code>android.intent.category.DEFAULT</code> I am only getting <code>ActivityNotFoundException</code>s. E.g. if I specify:</p>

<pre><code>    ...
    &lt;activity 
        android:name="mmmo.android.test.ItemDetails"
        &lt;intent-filter&gt;
            &lt;action android:name="android.intent.action.INSERT" /&gt;
                    &lt;category android:name="foo.bar" /&gt;
        &lt;/intent-filter&gt;
    &lt;/activity&gt;
    ...
</code></pre>

<p>and then try to start that Activity using:</p>

<pre><code>        ...
        Intent intent = new Intent(Intent.ACTION_INSERT);
        intent.addCategory("foo.bar"); 
        startActivity(intent);
        ...
</code></pre>

<p>this does not work. The doc reads "... every category in the Intent object must match a category in the filter. ...". The category name I add to the Intent matches the category I specified in the filter. So why does this not match up and just throws an exception???</p>

<p>Michael</p>
