Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Duplicate
-
cordova@7.1.0
-
None
-
Windows 10, cordova-cli@7.1.0, cordova-android@6.4.0
-
Important
Description
There is a problem with cordova-plugin-network-information on Android. Even if there is internet connection, after the app is opened for a while, when I resume the app from the background and I check connection with navigator.connection.type, it returns connection.type = NONE: I tried to do an ajax request to verify the connection, and it works, so there is connection. If I close and re-open the app it returns connection.type = 4G. I use cordova@7.1.0 and cordova-android@6.4.0.
My code to check the connection status is:
function isOnline() { var networkState = navigator.connection.type; if (networkState !== Connection.NONE) { return true } else { return false } }
Thanks
Cristian
Attachments
Issue Links
- duplicates
-
CB-12035 [cordova-plugin-network-information] connection info is not reliable on Android 6
- Open