You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by GitBox <gi...@apache.org> on 2020/04/12 20:57:26 UTC
[GitHub] [cordova-plugin-network-information] PieterVanPoyer commented on
issue #107: Android no internet triggering `online` function
PieterVanPoyer commented on issue #107: Android no internet triggering `online` function
URL: https://github.com/apache/cordova-plugin-network-information/issues/107#issuecomment-612674892
Hi
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 you check the navigator.connection.type when you receive the online event when switching to airplane mode?
Or can you refactor to work with the type property instead of the events and share the results?
Kind regards
----------------------------------------------------------------
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:
users@infra.apache.org
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org