Code example for WebChromeClient

0
 
        joystick = (JoystickView) findViewById(R.id.joystickView);
        joystick.setOnJoystickMovedListener(listener);
 
        webView = (WebView) findViewById(R.id.webView);
        webView.setWebChromeClient(new WebChromeClient());
        webView.getSettings().setPluginState(WebSettings.PluginState.ON_DEMAND);
        webView.getSettings().setJavaScriptEnabled(true);
        String server = this.activity.getArduinoADKApplication().getSettings().getRCServer();
        //Uri url = Uri.parse("http://" + server+ ":8080" + "/"); 
        //webView.loadUrl(url.toString()); 
        webView.loadUrl("file:///android_asset/index.html");
    } 
 
	@Override 
	protected void onUsbAccessoryAttached() { 
	} 
 
	@Override 
	protected void onUsbAccessoryDetached() { 
Stop searching for code, let great code find you!  Add Codota to your java IDE