This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Java | |
webview.getSettings().setJavaScriptEnabled(true); | |
webview.loadUrl("<your html file>"); //not in scope of this gist | |
webview.setWebViewClient(new WebViewClient(){ | |
public void onPageFinished(WebView view, String url){ | |
//Here you want to use .loadUrl again | |
//on the webview object and pass in | |
//"javascript:<your javaScript function" | |
webview.loadUrl("javascript:myJavaScriptFunc('" + argumentPassingIn + "')"); //if passing in an object. Mapping may need to take place | |
} |