Closed guylando closed 5 years ago
This plugin does not call a network endpoint to verify that the connection is actually connected, it only reports that there is a connection there. If you want to be sure that the connection is usable, you will have to attempt to load something over it.
@purplecabbage would be nice if this plugin would provide this enhancement built in by integrating optionally with something like: ios: https://github.com/tonymillion/Reachability https://github.com/ashleymills/Reachability.swift android: https://stackoverflow.com/questions/8919083/checking-host-reachability-availability-in-android
Thanks for the links @guylando This 'feature' is not worth risking apple rejections, imho. If you make a network call to your server and it fails, assume it is NOT reachable, if it succeeds, assume it IS reachable ... Network based apps should do their best to provide features and remain interactive regardless of network capabilities.
Well it can be used to display "offline" banner like in facebook/google
In android connect device to wifi and then configure a proxy to the wifi connection such that the proxy ip address is random non-existent. The plugin will report in navigator.connection.type the value "wifi" and will not detect that there is no internet connection. So checking internet connectivity using the plugin is unreliable.