title: React Native + Expo - Triggering an android intent to open locally stored files. (Android)
body: <p>We've got a managed expo app, which is using the <code>FileSystem.downloadAsync</code> and this is all okay.</p>
  
  <p>We've got a <code>FlatList</code> which is displaying a list of downloaded files.</p>
  
  <p>We don't want to build in a file viewer, for every app under the sun, that's not the aim.</p>
  
  <p>We want to be able to click a file from the list and potentially using the Android Intent system to offer the user a list of apps they already have installed which can handle the file type.</p>
  
  <p>e.g. We've got something like</p>
  
  <pre class="lang-js prettyprint-override"><code>
      class FileBrowser extends Component {
          state = {
              files: [
                  {
                      key: '1'
                      name: 'file.jpg',
                      sys_path: 'file://blah.jpg'
                  }
              ]
          }
  
          openFile(item) {
              IntentLauncherAndroid.startActivityAsync(
                 'android.intent.action.OPEN_DOCUMENT', {
                  data: item.sys_path
              })
          }
  
          render() {
              return (
                  &lt;FlatList data={ this.state.files } renderItem={ (item) =&gt; &lt;Button title={ item.name } onPress={ this.openFile(item) } /&gt;} /&gt;
              )
          }
      }
  </code></pre>
  
  <p>We've pretty much exhausted the list of intents from <a href="https://chromium.googlesource.com/android_tools/+/febed84a3a3cb7c2cb80d580d79c31e22e9643a5/sdk/platforms/android-23/data/activity_actions.txt" rel="noreferrer">https://chromium.googlesource.com/android_tools/+/febed84a3a3cb7c2cb80d580d79c31e22e9643a5/sdk/platforms/android-23/data/activity_actions.txt</a> </p>
  
  <p>The only one that <em>almost</em> gets there is <code>android.intent.action.VIEW</code> however that just opens a random list of apps, none of which can handle images - We've also passed in the mime type e.g. <code>image/jpeg</code> or <code>image/*</code>  hoping that will filter the list.</p>
  
  <hr>
  
  <p>What would be the correct way on Android only to offer the user to open the file in an appropriate apps?</p>