Question

I am using jQueryMobile and PhoneGap in my application. I want to display an Error page ("Network not available") when there is no mobile network. How can I display the error page without loading this page atleast once.

Was it helpful?

Solution

I also have this issue - I have resorted to have a 'page' which contains the error message, then I load the page up as a dialog (see docs for v1.3).

The dialog shows but there is only a default background behind the dialog.

  • Or use phonegaps notification feature

notification.alert

Shows a custom alert or dialog box.

navigator.notification.alert(message, alertCallback, [title], [buttonName])

message: Dialog message (String) alertCallback: Callback to invoke when alert dialog is dismissed. (Function) title: Dialog title (String) (Optional, Default: "Alert") buttonName: Button name (String) (Optional, Default: "OK")

http://docs.phonegap.com/en/2.7.0/cordova_notification_notification.md.html#notification.alert

OTHER TIPS

Check this post. Check out how many other app handle that, very few are using a new page for that. There is also this realted post that might also be useful.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top