Indeed, you can envelop it using the following code:
final Context myApp=this; webView.setWebChromeClient(new WebChromeClient(){ @Override public boolean onJsAlert(WebView view, String url, String message, final android.webkit.JsResult result) { new AlertDialog.Builder(myApp) .setTitle("Simmon says...") .setMessage(message) .setPositiveButton(android.R.string.ok, new AlertDialog.OnClickListener() { public void onClick(DialogInterface dialog, int wicht) { result.confirm(); } }).setCancelable(false) .create() .show(); return true; }; });
Source code here
GL
Paulo bueno
source share