开发者

Phonegap Android 'Application Error' when no network present. How to avoid?

开发者 https://www.devze.com 2023-02-12 10:10 出处:网络
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

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

0

精彩评论

暂无评论...
验证码 换一张
取 消