onReceivedError doesn't get called on HTTP response errors, only resource errors.
"... [onRecievedError] errors are not HTTP errors but are unrecoverable resource errors (file not found, no network connection, server not found for the main resource, etc.)." http://code.google.com/p/android/issues/detail?id=968 On Jun 9, 10:13 pm, Brad <[email protected]> wrote: > I've got a webview and I've set the webviewclient to my own class > where I override the onReceivedError and onPageFinished methods. > > When my server returns a 500 error code along with an html error > message, onPageFinished gets called but onReceviedError does not. > > I've tried calling a completely bogus url and onReceivedError does get > called in this case (with "unable to resolve host" error code). > > I wouldn't think it would matter but I'm making an https (SSL) call. > > Am I mistaken in believing that onReceivedError should get called when > my server returns 500? > > I could work around this by searching the returned html for a > commented keyword (that I insert in the server code), but alas there > is no way to access the html of the currently displayed page using > webview. > > Basically I want to hide the webview control unless I'm certain that > it's displaying the content that I intend (from my server). -- 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

