title: Open custom filetype in Samsung file explorer
body: <p>I have two custom filetypes that my app can handle that I would like to be able to open from a wide variety of other apps. What I have is working for many including Gmail and the Settings file explorer, but there several third file managers (including Samsung My Files and Astro File Manager) that do not recognize these filetypes as belonging to my app. Is there a way to craft an intent filter that will enable these file explorer apps to recognize that these files should be opened by my app?</p>
  
  <p>Here's the existing intent filters:</p>
  
  <pre><code>&lt;intent-filter&gt;
      &lt;action android:name="android.intent.action.MAIN" /&gt;
  
      &lt;category android:name="android.intent.category.LAUNCHER" /&gt;
  &lt;/intent-filter&gt;
  
  &lt;!-- See http://stackoverflow.com/questions/1733195/android-intent-filter-for-a-particular-file-extension/2062112#2062112 --&gt;
  
  
  &lt;!--
          Capture content by MIME type, which is how Gmail broadcasts
          attachment open requests.  pathPattern and file extensions
          are ignored, so the MIME type *MUST* be explicit, otherwise
          we will match absolutely every file opened.
  --&gt;
  &lt;intent-filter
      android:icon="@drawable/book"
      android:label="@string/app_name"
      android:priority="50"&gt;
      &lt;action android:name="android.intent.action.VIEW" /&gt;
  
      &lt;category android:name="android.intent.category.BROWSABLE" /&gt;
      &lt;category android:name="android.intent.category.DEFAULT" /&gt;
  
      &lt;!-- needed for properly formatted email messages --&gt;
      &lt;data
          android:mimeType="application/vnd.bloom"
          android:scheme="content" /&gt;
      &lt;!-- needed for mangled email messages --&gt;
      &lt;data
          android:mimeType="application/bloom"
          android:scheme="content" /&gt;
      &lt;!-- needed for properly formatted email messages --&gt;
      &lt;data
          android:mimeType="application/vnd.bloomd"
          android:scheme="content" /&gt;
      &lt;!-- needed for mangled email messages --&gt;
      &lt;data
          android:mimeType="application/bloomd"
          android:scheme="content" /&gt;
      &lt;!-- needed for properly formatted email messages --&gt;
      &lt;data
          android:mimeType="application/vnd.bloombundle"
          android:scheme="content" /&gt;
      &lt;!-- needed for mangled email messages --&gt;
      &lt;data
          android:mimeType="application/bloombundle"
          android:scheme="content" /&gt;
      &lt;!-- needed for mangled email messages --&gt;
      &lt;data
          android:mimeType="application/octet-stream"
          android:scheme="content" /&gt;
  &lt;/intent-filter&gt;
  
  &lt;!--
          Capture file open requests (pathPattern is honoured) where no
          MIME type is provided in the Intent.  An Intent with a null
          MIME type will never be matched by a filter with a set MIME
          type, so we need a second intent-filter if we wish to also
          match files with this extension and a non-null MIME type
          (even if it is non-null but zero length).
  --&gt;
  &lt;intent-filter
      android:icon="@drawable/book"
      android:label="@string/app_name"
      android:priority="50"&gt;
      &lt;action android:name="android.intent.action.VIEW" /&gt;
  
      &lt;category android:name="android.intent.category.BROWSABLE" /&gt;
      &lt;category android:name="android.intent.category.DEFAULT" /&gt;
  
      &lt;data android:scheme="file" /&gt;
      &lt;data android:host="*" /&gt;
  
      &lt;!--
              Work around Android's ugly primitive PatternMatcher
              implementation that can't cope with finding a . early in
              the path unless it's explicitly matched.
      --&gt;
      &lt;data android:pathPattern=".*\\.bloomd" /&gt;
      &lt;data android:pathPattern=".*\\..*\\.bloomd" /&gt;
      &lt;data android:pathPattern=".*\\..*\\..*\\.bloomd" /&gt;
      &lt;data android:pathPattern=".*\\..*\\..*\\..*\\.bloomd" /&gt;
      &lt;data android:pathPattern=".*\\..*\\..*\\..*\\..*\\.bloomd" /&gt;
      &lt;data android:pathPattern=".*\\..*\\..*\\..*\\..*\\..*\\.bloomd" /&gt;
      &lt;data android:pathPattern=".*\\..*\\..*\\..*\\..*\\..*\\..*\\.bloomd" /&gt;
      &lt;data android:pathPattern=".*\\.bloombundle" /&gt;
      &lt;data android:pathPattern=".*\\..*\\.bloombundle" /&gt;
      &lt;data android:pathPattern=".*\\..*\\..*\\.bloombundle" /&gt;
      &lt;data android:pathPattern=".*\\..*\\..*\\..*\\.bloombundle" /&gt;
      &lt;data android:pathPattern=".*\\..*\\..*\\..*\\..*\\.bloombundle" /&gt;
      &lt;data android:pathPattern=".*\\..*\\..*\\..*\\..*\\..*\\.bloombundle" /&gt;
      &lt;data android:pathPattern=".*\\..*\\..*\\..*\\..*\\..*\\..*\\.bloombundle" /&gt;
  &lt;/intent-filter&gt;
  
  &lt;!--
          Capture file open requests (pathPattern is honoured) where a
          (possibly blank) MIME type is provided in the Intent.  This
          filter may only be necessary for supporting ES File Explorer,
          which has the probably buggy behaviour of using an Intent
          with a MIME type that is set but zero-length.  It's
          impossible to match such a type except by using a global
          wildcard.
  --&gt;
  &lt;intent-filter
      android:icon="@drawable/book"
      android:label="@string/app_name"
      android:priority="50"&gt;
      &lt;action android:name="android.intent.action.VIEW" /&gt;
  
      &lt;category android:name="android.intent.category.BROWSABLE" /&gt;
      &lt;category android:name="android.intent.category.DEFAULT" /&gt;
  
      &lt;data android:scheme="file" /&gt;
      &lt;data android:host="*" /&gt;
      &lt;data android:mimeType="*/*" /&gt;
  
      &lt;!--
              Work around Android's ugly primitive PatternMatcher
              implementation that can't cope with finding a . early in
              the path unless it's explicitly matched.
      --&gt;
      &lt;data android:pathPattern=".*\\.bloomd" /&gt;
      &lt;data android:pathPattern=".*\\..*\\.bloomd" /&gt;
      &lt;data android:pathPattern=".*\\..*\\..*\\.bloomd" /&gt;
      &lt;data android:pathPattern=".*\\..*\\..*\\..*\\.bloomd" /&gt;
      &lt;data android:pathPattern=".*\\..*\\..*\\..*\\..*\\.bloomd" /&gt;
      &lt;data android:pathPattern=".*\\..*\\..*\\..*\\..*\\..*\\.bloomd" /&gt;
      &lt;data android:pathPattern=".*\\..*\\..*\\..*\\..*\\..*\\..*\\.bloomd" /&gt;
      &lt;data android:pathPattern=".*\\.bloombundle" /&gt;
      &lt;data android:pathPattern=".*\\..*\\.bloombundle" /&gt;
      &lt;data android:pathPattern=".*\\..*\\..*\\.bloombundle" /&gt;
      &lt;data android:pathPattern=".*\\..*\\..*\\..*\\.bloombundle" /&gt;
      &lt;data android:pathPattern=".*\\..*\\..*\\..*\\..*\\.bloombundle" /&gt;
      &lt;data android:pathPattern=".*\\..*\\..*\\..*\\..*\\..*\\.bloombundle" /&gt;
      &lt;data android:pathPattern=".*\\..*\\..*\\..*\\..*\\..*\\..*\\.bloombundle" /&gt;
  &lt;/intent-filter&gt;
  </code></pre>