Java tutorial
//package com.java2s; import android.webkit.WebView; public class Main { public static void execIsEnabledCallbackCommand(final WebView webView, final String commandName, final String isEnabled) { if (webView == null) { return; } webView.post(new Runnable() { @Override public void run() { String command = "javascript:" + commandName + "(" + isEnabled + ");"; webView.loadUrl(command); } }); } }