Open browser with Data URI Scheme instead of a URL
<p>Well, I was breaking the hell of my brain cells with this and no solution came up...</p>

<p>Usually, in Android, to open the Web Browser in a specified Website, we do this:</p>

<pre><code>Intent browserIntent = new Intent(Intent.ACTION_VIEW, Uri.parse("http://www.google.com"));
startActivity(browserIntent);
</code></pre>

<p>So, I got a Data URI Scheme (dunno if it is written this way, i'm not an expert on this kind of stuff) like this:</p>

<pre><code>data:text/html;charset=utf8;base64,&lt;base64 html code&gt;
</code></pre>

<p>If I copy and paste this in a web browser, it will handle it the way I want it.</p>

<p>But how can I do it programatically in Android?</p>

<pre><code> Intent browserIntent = new Intent(Intent.ACTION_VIEW, Uri.parse(dataHTMLBase64));
 startActivity(browserIntent);
</code></pre>

<p>dataHTMLBase64 stores the Data URI Scheme I mentioned before.</p>

<p>The code above won't work. It won't even launch chrome.</p>

<p>What can I do?</p>

<p>PS: I'm not good with English. Please warn me if I didn't express myself the right way...</p>