Here is what occurs: (==>denotes a call I make, --> denotes a callback)
==>webView.loadUrl(A); -->webViewClient.shouldOverrideUrlLoading(B) { ==> webView.loadUrl(B); return true; } -->webViewClient.onPageFinished(B); -->webViewClient.onPageFinished(B); Notice that onPageFinished gets called twice. This is unexpected. If I don't implement shouldOverrideUrlLoading, I only get one onPageFinished, and my redirect from A to B works, but other redirects dont' work (I presume they are returning different status codes or something). Are there conditions I should check for before calling WebView#loadUrl inside of WebViewClient#shouldOverrideUrlLoading? Thanks! -Heath Borders heath.bord...@gmail.com Twitter: heathborders http://heath-tech.blogspot.com On Sat, Feb 19, 2011 at 7:20 AM, Mark Murphy <mmur...@commonsware.com> wrote: > On Sat, Feb 19, 2011 at 2:59 AM, Heath Borders <heath.bord...@gmail.com> > wrote: >> When I call WebView#loadUrl I expect that I should only get a single >> WebViewClient#onPageFinished call and no >> WebViewClient#shouldOverrideUrlLoading call. However, I get >> a WebViewClient#shouldOverrideUrlLoading (which I implement by always >> calling WebView#loadUrl and returning true) and then >> two WebViewClient#onPageFinished calls with the same URL. > > That may be due to a redirect issued by your server. Have you logged > the URLs in question? > > -- > Mark Murphy (a Commons Guy) > http://commonsware.com | http://github.com/commonsguy > http://commonsware.com/blog | http://twitter.com/commonsguy > > Android Training in London: http://bit.ly/smand1 and http://bit.ly/smand2 > > -- > You received this message because you are subscribed to the Google > Groups "Android Developers" group. > To post to this group, send email to android-developers@googlegroups.com > To unsubscribe from this group, send email to > android-developers+unsubscr...@googlegroups.com > For more options, visit this group at > http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en