title: How do I display and print raw HTML on an Android device?
body: <p>I have a java application that I'm porting over to android. One function I have is to export a summary of the data to HTML that is displayed in the local browser. How would I mimic this functionality on the Android platform? The intention is to allow the user to view the data easily and save/export/print as they want to.</p>
  
  <p>Here's my regular desktop Java version:</p>
  
  <pre><code>String html = "&lt;html&gt;&lt;head&gt;&lt;style type=\"text/css\"&gt;.pagebreak {page-break-after: always;}.smallFont{font-size:10px}" + fancyCss + "&lt;/style&gt;" + internationalCharacters + "&lt;/head&gt;&lt;body&gt;" + content + "&lt;/body&gt;&lt;/html&gt;";
  
  try {
      File file = File.createTempFile(filename, ".html");
  
      FileOutputStream stream = new FileOutputStream(file);
  
      stream.write(html.getBytes("UTF-8"));
      stream.flush();
      stream.close();
  
      Desktop.getDesktop().open(file);
  } catch (IOException e) {
      e.printStackTrace();
  }
  </code></pre>