Code example for JsResult

Methods: confirm

0
     */ 
    public class AlertChromeClient extends WebChromeClient {
        @Override 
        public boolean onJsAlert(WebView view, String url, String message, JsResult result) {
            Toast.makeText(JavascriptInterfaceActivity.this, message, Toast.LENGTH_LONG).show();
            result.confirm();
            return true; 
        } 
    } 
 
} 
Experience pair programming with AI  Get Codota for Java