Code example for JsResult

Methods: confirm

0
    class SimpleChromeClient extends WebChromeClient {
 
        private int timeoutCounter = 0;
 
        @Override 
        public boolean onJsAlert(WebView view, String url, String message, JsResult result) {
            result.confirm();
            return true; 
        } 
 
        @Override 
        public boolean onJsBeforeUnload(WebView view, String url, String message, JsResult result) {
            result.confirm();
            return true; 
        } 
 
        @Override 
        public boolean onJsConfirm(WebView view, String url, String message, JsResult result) {
            result.confirm();
            return true; 
        }