How to handle a binary data response in WebView
<p>My activity has an intent filter to pick up a specific url and open it in a WebView control, which brings user to an auth page (user name/password). After authentication is done user will get a binary stream response (file). Is there a way to handle that response and read data from the stream?</p>

<p>I tried to setup a custom WebViewClient with the overridden shouldOverrideUrlLoading method, but app doesn't get there.</p>

<pre><code>@Override 
mMyWebView.setWebViewClient(new CustomWebClient());
mMyWebView.loadUrl("http://xxx.xx.x.xx:xxxx/getCert");

...
private class CustomWebClient extends WebViewClient
{
    @Override
    public boolean shouldOverrideUrlLoading  (WebView  view, String  urlConection)
    {
       // break point here doesn't stop debugger
       return true;
    }
}
</code></pre>

<p>neither works</p>

<pre><code>mMyWebView.setWebViewClient(new WebViewClient(){

    @Override
    public boolean shouldOverrideUrlLoading  (WebView  view, String  urlConection)
    ....
});
</code></pre>

<p>Server reacts on requests in the same way from both My app and build-in browser. Build-in browser starts to download file received in response, but my app doesn't do anything and doesn't hit breakpoint inside CustomWebClient. 
This is a separate app just to test this piece nothing else interferes with it. INTERNET &amp; WRITE_EXTERNAL_STORAGE permissions added.</p>

<p><strong>EDIT: Mar 8</strong>
Gave up. Will go with httpClient.</p>
