We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2c9091c commit bcc6cfdCopy full SHA for bcc6cfd
src/core/services/network.ts
@@ -159,8 +159,15 @@ export class CoreNetworkService extends Network {
159
return;
160
}
161
162
- const type = this.connectionType;
+ // We cannot use navigator.onLine because it has issues in some devices.
163
+ // See https://bugs.chromium.org/p/chromium/issues/detail?id=811122
164
+ if (!CorePlatform.isAndroid()) {
165
+ this.online = navigator.onLine;
166
167
+ return;
168
+ }
169
+
170
+ const type = this.connectionType;
171
let online = type !== null && type !== CoreNetworkConnection.NONE && type !== CoreNetworkConnection.UNKNOWN;
172
173
// Double check we are not online because we cannot rely 100% in Cordova APIs.
0 commit comments