title: WebChromeClient OnJSAlert is not called
body: <p>I'm running a JS script in a WebView. The script alerts a message to the WebView, and I want to receive it in my app. The problem is that <code>onJSAlert</code> is not called nor I can use <code>@Override</code> annotaion when definig the method.<br>
  My imports are -  </p>
  
  <pre><code>import android.webkit.WebChromeClient;
  import android.webkit.WebView;
  import android.webkit.WebViewClient;
  import android.webkit.JsResult;
  import android.webkit.WebSettings;
  </code></pre>
  
  <p>I use the WebView like this -  </p>
  
  <pre><code>webView = (WebView)findViewById(R.id.webView1); 
  webView.getSettings().setJavaScriptEnabled(true);
  webView.setWebChromeClient(new WebChromeClient() {
          @Override
          public void onProgressChanged(WebView view, int newProgress) {
              if (newProgress == 100) {
              Log.d("fibi", "finished loading");
              }
          }
          //@Override //If I uncomment this I get compilation error
          public boolean onJSAlert(WebView view, String url, String message, final JsResult result) {
              encResult = message;
              Log.d("fibi", encResult);
              result.cancel();
              return true;                
          }
      });
  webView.loadUrl("file:///android_asset/test.html");
  </code></pre>
  
  <p>And my HTML code for test.html is </p>
  
  <pre><code> &lt;html&gt;
     &lt;body &gt;
       &lt;div onclick="alert('CLICK')"&gt; Click Me !!  &lt;/div&gt;
     &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>When I run the app, the HTML file loads and the <code>onProgressChanged</code> is been called - I can see the log message that says "finished loading". When I click on the link at the loaded page, the <code>onJSAlert</code> is not called - I don't get the log message and instead I can see a dialog window that pops on my device with the alert message.<br>
  If I try to use the <code>@Override</code> annotaion at the beginning of the <code>onJSAlert</code>, I get error - "The method onJSAlert(WebView, String, String, JsResult) of type MainActivity.MyWebClient must override or implement a supertype method".<br>
  Any ideas?</p>