I'm new to phoneGap, and i'm trying to implement a webview in android with SVG support to render some visualization methods using the protovis (javaScript-based) library http://mbostock.github.com/protovis/.
I have the following code to load the html file.
public class HelloPhoneGapActivity extends DroidGap {
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
super.loadUrl("file:///android_asset/www/index.html");
}
}
Right now i'm trying to render this http://mbostock.github.com/protovis/ex/antibiotics-burtin-full.html, but in the android's webview i can only get the background color.
Is there any special option to build a webview with the hability to render this?
Thanks in advance!
U Can use WebView Concept like this to load your Url.
webView = (WebView) findViewById(R.id.webview);
webView.getSettings().setJavaScriptEnabled(true);
//webView.loadUrl("http://www.google.com");
webView.setWebViewClient(new WebViewClient());
webView.loadUrl("http://www.google.com");
Look at this Link.it may helpfull.. http://developer.android.com/resources/tutorials/views/hello-webview.html