Phonegap Android 'Application Error' when no network present. How to avoid?
I'm using Phonegap Android and it's building well and very happy so far. My app incorporates some web pages. If I'm开发者_开发百科 on a network everything is fine but if there is no network, I get a dialog box that states "Application Error, the URL could not be found. (http://myurl.com). This doesn't happen on the iPhone implementation of phonegap. Is there a way to turn off this alert or change the alert to "No Network Detected" or something less detailed that doesn't list the URL? Thanks.
You might be interested in network.isReachable function ;)
http://docs.phonegap.com/phonegap_network_network.md.html#Network
精彩评论