Android webview exceptions and timeouts

852 views
Skip to first unread message

jxp

unread,
Jan 7, 2013, 8:29:08 AM1/7/13
to phon...@googlegroups.com
(Sorry if this is a double post, but I can't see the original any more)

I'm trying to handle exceptions in my PhoneGap application. One way I'm doing this is with a "bad" link.
e.g. On the first page I include a link to http://1.2.3.4/SomeSite

Clicking this link results in an error after 10 minutes. Is there a way to change this timeout?
I tried setting loadUrlTimeoutValue to 10000 (10 seconds) but I still wait 10 minutes for this error.

01-07 12:13:34.473: D/DroidGap(667): onMessage(onPageStarted,http://1.2.3.4/SomeSite)
01-07 12:23:01.984: D/Cordova(667): CordovaWebViewClient.onReceivedError: Error code=-6 Description=The connection to the server was unsuccessful. URL=http://1.2.3.4/SomeSite


Secondly, by default PhoneGap shows the error message and then closes. I can set the errorUrl property to display an error page instead.
Is there any way to determine what the exception was from this error page?

    super.setStringProperty("errorUrl", "file:///android_asset/www/error.html");

Finally, is this behaviour mirrored in iOS at all or is it Android specific?
Reply all
Reply to author
Forward
0 new messages