You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If you run an Ionic app, the 'online' event is normally added after the deviceready (platform.ready()) event. The 'online' or 'offline' event is already fired then. (The first events are fired even before the first deviceready event on android);
You could always read the type of navigator.connection when you need to:
const networkState = navigator.connection.type;
if (networkState === 'none') {
console.log('We are offline');
} else {
console.log('We are online');
}
In our company, we allways check the navigator.connection.type before every api call.
the solution that it poses @PieterVanPoyer has solved the problem for me pm android, but in them there is iOS no solution, at the moment I am satisfied.
Steps to repeat:
The text was updated successfully, but these errors were encountered: