There seems to be a bug in WebViewClient in gingerbread, we rely on the method boolean shouldOverrideUrlLoading(WebView view, String url) to put headers back into redirects and reloads.
@Override
public boolean shouldOverrideUrlLoading(WebView view, String url) {
if (url.startsWith(URL.BASE_URL)) {
view.loadUrl(url, RestClient.defaultHeaders);
}else {
onExternalBrowserURL(url);
}
return true;
}
In 2.2 shouldOverrideUrlLoading is not always called, the mobile website rather than the android site loading.
There is the bug listed here http://code.google.com/p/android/issues/detail?id=15612 See here 2013 is last comment :( http://code.google.com/p/android/issues/detail?id=2887
Does anyone have a solution that doesn't involve changing all of the URL's into a custom url scheme or protocol?
Thanks