Hi,
Thanks for the reply, I am already using a WebViewClient here
(ThisWebViewClient).

However, what I've noticed is that the shouldOverrideUrlLoading()
seems to be not getting the right hostname and my theory is that the
302 processing has already happened before the
shouldOverrideUrlLoading() is called.

Basically this is what happens:
1) I call webView.loadUrl("http://host1/somePath/?param=eg";);  - this
should redirect to "http://host2/path2/?otherparam=eg";
2) When shouldOverrideUrlLoading() is called the url parameter passed
is not correct and it seems to change it to "http://host2/somePath/?
param=eg"



On Nov 20, 1:04 pm, Mark Murphy <[email protected]> wrote:
> Add a WebViewClient with a shouldOverrideUrlLoading() implementation.
> That method gets control for link clicks and redirects. You can then
> load the redirected URL back in theWebView.
>
>
>
>
>
>
>
>
>
> On Sat, Nov 19, 2011 at 7:01 PM, DoubleCheese <[email protected]> wrote:
> > Hi,
> > I am using awebviewto load a URL which results in a few302
> > redirects. However, I've noticed that it doesn't seem to follow the
> > redirects correctly. Is there a way to setupWebViewso it follows the
> > redirect?
>
> > Here is the code I use to initialize myWebView:
> >        finalWebViewwebview= (WebView)
> > findViewById(R.id.authBrowser);
> >        webview.setVerticalScrollBarEnabled(false);
> >        webview.setHorizontalScrollBarEnabled(false);
>
> >        WebSettings webSettings =webview.getSettings();
> >        webSettings.setBuiltInZoomControls(true);
> >        webview.setWebViewClient(new ThisWebViewClient());
> >        webSettings.setCacheMode(WebSettings.LOAD_NO_CACHE);
> >        wv =  webview.new WebViewTransport();
> >        wv.setWebView(webview);
>
> > --
> > You received this message because you are subscribed to the Google
> > Groups "Android Developers" group.
> > To post to this group, send email to [email protected]
> > To unsubscribe from this group, send email to
> > [email protected]
> > For more options, visit this group at
> >http://groups.google.com/group/android-developers?hl=en
>
> --
> Mark Murphy (a Commons 
> Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy
>
> _The Busy Coder's Guide to Android Development_ Version 3.6 Available!

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to