Cordova android app working on offline mode
I am working on cordova android app. I have stored all JSON data on local storage which comes on my apps dashboard page from server database. I have also checked "navigator.connection.type" in if else loop to run code accordingly to call offline function or online function in deviceready. when my device changes from online to offline or verse a versa, if my phone is in offline function then it shows offline data still if i have network connection. and when i run project code from cli using command cordova run android -device then only it refreshes shows alerts. Now please help to get network information updated once i goes online or offline.
链接地址: http://www.djcxy.com/p/79778.html