Phonegap is an amazing framework. It makes building android apps a breeze.
In this post, we will learn the technique of showing a user a native dialog box when the mobile device does not have an internet connection.
The code is as follows:
Explanation:
The whenOffline() functions is fired as soon as the device is not connected to the internet.
We then use navigator.notification.alert to display the alert dialog box to the user.
0 comments :
Post a Comment