How to open contents of a html page which contains google api for charts in android emulator
<p>I want to open the contents of a html file which I have saved in my assets folder.The html file contains the chart api provided by the google graphs.</p>

<p>Content of the HTML file are:</p>

<pre><code>&lt;html&gt;
&lt;head&gt;    
&lt;script type="text/javascript" src="https://www.google.com/jsapi"&gt;
&lt;/script&gt;    
&lt;script type="text/javascript"&gt;      
google.load("visualization", "1", {packages:["corechart"]});      
google.setOnLoadCallback(drawChart);      
function drawChart()
 {        
var data = google.visualization.arrayToDataTable([   ['Task', 'Hours per Day'],          
['Work',     11],          
['Eat',      2],          
['Commute',  2],          
['Watch TV', 2],          
['Sleep',    7]        
]);        
var options = {title: 'My Daily Activities'};        
var chart = new google.visualization.PieChart(document.getElementById('chart_div'));
chart.draw(data, options);
}    
&lt;/script&gt;  
&lt;/head&gt;  
&lt;body&gt;    
&lt;div id="chart_div" style="width: 900px; height: 500px;"&gt;&lt;/div&gt;  
&lt;/body&gt;
&lt;/html&gt;
</code></pre>

<p>I have written my main activity class as:</p>

<pre><code> package com.example.webapptest;

import java.io.IOException;
import java.io.InputStream;
import java.net.ConnectException;

import android.app.Activity;
import android.os.Bundle;
import android.view.Menu;
import android.webkit.WebSettings;
import android.webkit.WebView;

public class MainActivity extends Activity {

    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        WebView webview = new WebView(this); 
        WebSettings webSettings = webview.getSettings(); 
        webSettings.setJavaScriptEnabled(true);
        setContentView(webview); 

        InputStream fin;
        try {
            fin = getAssets().open("web_page_test.html");
            byte[] buffer = new byte[fin.available()]; 
            fin.read(buffer); 
            fin.close();
            webview.loadData(new String(buffer), "text/html", "UTF-8");
        } catch (IOException e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
        } 




    }

    @Override
    public boolean onCreateOptionsMenu(Menu menu) {
        getMenuInflater().inflate(R.menu.activity_main, menu);
        return true;
    }
}
</code></pre>

<p>But it is showing that web page is down or not available error...
Please help Asap.</p>
