title: Open html file in browser from intent
body: <p>I would like to open downloaded html-files via browser by passing them into an intent and starting them out of my activity.</p>
  
  <p>I know that there are dozen of threads about this problem (e.g. <a href="https://stackoverflow.com/questions/7009452/how-to-launch-browser-to-open-local-file">this</a>).</p>
  
  <p>However, none of these approaches seem to work.</p>
  
  <p>So far I have:</p>
  
  <pre><code>File file = //myHTMLFile;
  Intent browserIntent = new Intent(Intent.ACTION_VIEW);
  browserIntent.addCategory(Intent.CATEGORY_BROWSABLE);
  browserIntent.setData(Uri.fromFile(file));
  </code></pre>
  
  <p>I tried setting <strong>Mimeypes</strong> like <strong>text/html</strong>, adding/removing categories and even using multipe mimetypes and the extra mimetype flag but none of these ideas worked for me.</p>
  
  <p>Currently a "default" browser will open which cannot show the file. I would like to open files in Chrome, Firefox or other popular browsers.</p>
  
  <p>Also weird: The Uri-String, which I receive from Uri.fromFile() is not openable by Chrome. </p>
  
  <p>The path looks like <strong>file:///data/data/myapp/website.html</strong>. </p>
  
  <p>The file itself is located at <strong>/storage/emulated/0/myapp/website.html</strong>. Passing this value with file:/// as prefix, Chrome will show the website.</p>
  
  <p><strong>Is Uri.fromFile correct?</strong></p>