I am using phonegap for my application. My application is based on RSS_FEED from one website. but my requirement is when the internet is not there, the application should alert- offline.
when the application launches on the Internet all the data stored in the database. and when the Internet does not have time data obtained from the database, so my problem is only that the application shows me online every time I use it navigator.onLine.
if(navigator.onLine) {
alert("check online");
loadScript("http://www.google.com/jsapi",msgOnFn)
loadScript("js/googleapi.js", msgOnFn);
} else {
loadScript("js/db.js",msgOffFn);
}
I tried THIS ALSO
In this case, none or wifi is displayed every time . I do not understand why this is happening.
in a web browser, it works fine. :)