3

My WebView based code is too long (and scattered across several modules) to post here, and I am looking for a general technique that may be helpful to others anyway, so here goes:

I have a set of WebView, WebViewClient and JavascriptInterface derived classes that implement a basic web browser. It seems to be working pretty well, except that on websites running Omniture, on a one phone only (Nexus One running CyanogenMod 6 (Android 2.2.1), a loadUrl() with a url that exceeds a certain (reasonable) length will freeze, then eventually will time out with onReceiveError(), ERROR_IO (-7) with the following description string:

The server failed to communicate. Try again later.

To clarify: Same exact code, same exact URL works flawlessly on all other phones that I have tested.

I could have shrugged this off by attributing this anomaly to a bug in the particular version of android.webkit in that phone, but I somehow suspect that I may be missing something in my own code that can workaround this. The reason is that on the same exact phone, the WebView-based stock browser doesn't exhibit this problem.

Curious and meticulous that I am, I find this intriguing and challenging, perhaps a great opportunity to delve deeper into some HTTP protocol debug techniques.

For example, if I had a way to tap into android.net.http to get diagnostic log messages, that would have been super, but how to I do that for WebView and WebViewClient?

Any suggestions or tips on how to troubleshoot this?

Bill The Ape
  • 3,261
  • 25
  • 44

0 Answers0