Issue
I have a an app that uses a webview and webviewclient. It's supposed to be a whitelist based browser for kids, so I'm checking urls and only allowing certain ones to be loaded. Generally its working, but when I search on google and click a search result, I get a page that says "Redirect Notice - the previous page is sending you to..."
I am not posting code because I don't know which section is relevant. Can anyone point me where to look?
Added: The problem has to be either 1) in the way Google is serving the search results (why would it it be different than the default browser?), or 2) how the webview is handling them.
I'm starting to think it has to do with the way Google is serving search results, as the links give the "redirect notice" anywhere. Here's an example link: http://www.google.com/url?sa=t&source=web&cd=2&ved=0cccqfjab&url=http%3a%2f%2faerik.com%2f&ei=dlwwt-bgc-wciqk8tkzadw&usg=afqjcnhkstsuy-erndsrb4nkkpvda_xutq
If Google is serving my app search results differently, could it be because of cookies or user-agents? Does a webview automatically handle cookies and send the default user-agent?
Solution
Ah... I figured it out. I doubt anyone else will have a similar issue, because the root cause was that I was lowercasing the URL as I checked it against the whitelist, then loading the lowercased URL... kind of dumb, but then again, many bugs are.
Answered By - Aerik
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.