diff --git a/src/core/services/network.ts b/src/core/services/network.ts index 397e79f4d..d7206e0b6 100644 --- a/src/core/services/network.ts +++ b/src/core/services/network.ts @@ -159,8 +159,15 @@ export class CoreNetworkService extends Network { return; } - const type = this.connectionType; + // We cannot use navigator.onLine because it has issues in some devices. + // See https://bugs.chromium.org/p/chromium/issues/detail?id=811122 + if (!CorePlatform.isAndroid()) { + this.online = navigator.onLine; + return; + } + + const type = this.connectionType; let online = type !== null && type !== CoreNetworkConnection.NONE && type !== CoreNetworkConnection.UNKNOWN; // Double check we are not online because we cannot rely 100% in Cordova APIs.