PieterVanPoyer commented on issue #99: Network status not reliable URL: https://github.com/apache/cordova-plugin-network-information/issues/99#issuecomment-593623078 Hi I've got 2 remarks: 1) You seem to be using version 2.0.1 of this plugin `cordova-plugin-network-information 2.0.1 "Network Information"` First try to update to version 2.0.2. That is the current version on npm. 2) In our company we do not rely on the 'offline' and 'online' events. In our project, we allways check the navigator.connection.type before every api call. const networkState = navigator.connection.type; if (networkState === 'none') { console.log('We are offline'); } else { console.log('We are online'); } Can any of these remarks help in solving your problem? Kind regards, Pieter
---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected] With regards, Apache Git Services --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
