title: Android intent filter: associate app with file extension
body: <p>I have a custom file type/extension that I want to associate my app with.</p>
  
  <p>As far as I know, the data element is made for this purpose, but I can't get it working.
  <a href="http://developer.android.com/guide/topics/manifest/data-element.html" rel="noreferrer">http://developer.android.com/guide/topics/manifest/data-element.html</a>
  According to the docs, and a lot of forum posts, it should work like this:</p>
  
  <pre><code>&lt;intent-filter&gt;
      &lt;action android:name="android.intent.action.MAIN" /&gt;
      &lt;category android:name="android.intent.category.DEFAULT" /&gt;
      &lt;category android:name="android.intent.category.BROWSABLE" /&gt;
      &lt;data android:mimeType="application/pdf" /&gt;
  &lt;/intent-filter&gt;
  </code></pre>
  
  <p>Well, it does not work. What did I do wrong? I simply want to declare my own file type.</p>