Hi 

I am developing an App that intercepts the request and process them and 
then updates send the WebResourcesResponse.   The code works with no issues 
on 4.2 but when I try it in 5.0 the function shouldInterceptRequest never 
sees the request.  I know that there was an update on the library and I 
have made the modifications but I do not see any requests being processed. 
 As you can see I have added a toast message to tell me if we enter the 
shouldInterceptRequest function but I never see the message.   The requests 
that are being processes are simple gets of a html page with frames. On 4.2 
works with no problem but on 5.0 it does not work.   Any ideas?

Thank you,

fc8282



private class WebViewClientImpl extends WebViewClient
{
    @Override
        public boolean shouldOverrideUrlLoading(WebView view, String url)
    {
            return false;
    }
    
    @Override
        public void onPageFinished(WebView view, String url)
    {
            
    }
    
    @SuppressWarnings("deprecation") // From API 21 we should use another 
overload
    @Override
    public WebResourceResponse shouldInterceptRequest ( final WebView view, 
String msg)
    {
    return processRequest ( view, msg );
    }
    
    //@TargetApi(Build.VERSION_CODES.LOLLIPOP)
    @TargetApi(android.os.Build.VERSION_CODES.LOLLIPOP)
        @Override
        public WebResourceResponse shouldInterceptRequest( WebView view, 
WebResourceRequest request)
    {
        Toast.makeText(getBaseContext(), "We are in the 
shouldInterceptRequest 5.0: ",
    Toast.LENGTH_LONG).show();
        
        
    String msg = request.getUrl().toString();
    
    return shouldInterceptRequest(view, request.getUrl().toString());

                // Have also tried just simply doing the return.
    //return processRequest ( view, msg );
    }


    public WebResourceResponse processRequest ( final WebView view, String 
msg )

-- 
You received this message because you are subscribed to the Google Groups 
"Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/android-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/android-developers/22e90b78-0907-4403-a499-162da7c1057b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to