I wan to call a javascript function from an android activity but it doesn\'t seem to work. I have used the android webview function webview.loadUrl(\"javascript:function()\"
Try:
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
webview = (WebView)findViewById(R.id.webView1);
webview.getSettings().setJavaScriptEnabled(true);
webview.loadUrl("file:///android_asset/index.html");
webview.loadUrl("javascript:change("+String.valueOf(i)+")");
}