Hi,
Some more additional info:
When I use a URLConnection to GET the request it, works and follows
the redirect properly. What I do next is to use this reponse and load
the html to the web view using
webView.loadDataWithBaseURL() - in here I set the baseUrl to the host
I expect.
I also tried to set the following:
webSettings.setJavaScriptEnabled(true);
webSettings.setJavaScriptCanOpenWindowsAutomatically(true);
As it seems the pages I load uses javascript to change the
window.location, but when this happens, it doesn't seem to go through
the WebViewClient.
On Nov 20, 1:23 pm, Mark Murphy <[email protected]> wrote:
> On Sat, Nov 19, 2011 at 7:14 PM, DoubleCheese <[email protected]> wrote:
> > Thanks for the reply, I am already using a WebViewClient here
> > (ThisWebViewClient).
>
> I noticed that about five seconds after pressing Send... :-)
>
> > 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 callwebView.loadUrl("http://host1/somePath/?param=eg"); - this
> > shouldredirectto "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"
>
> Can you check the server logs and see what is happening from that side?
>
> I'm not aware of much else for tailoringredirectbehavior. You might
> dump getOriginalUrl() on theWebViewto see what it reports.
>
> --
> 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