-
-
Notifications
You must be signed in to change notification settings - Fork 73
IsRemoteReachable returns true if there is no internet connection #89
Comments
Do you still have cell reception though, Android is smart enough to know that in this case that you can still use the cell even when not logged in? What happens when you go to the browser? |
When trying to load "www.google.com" in browser it redirects me to the Login page. By the way, when using Ping.Send it returns "TtlExpired". |
IsRemoteReachable returns true when google.com is reachable, which is true, but you can't ACCESS it, so the behavior for IsRemoteReachable look fine for me. |
I believe this is as designed. As this is a use case that is nearly impossible to test for. |
I have similar issue, but I have disconnected ethernet cable from router. Wifi connected, but no internet access. |
i'm facing this issue using Xamarin.Forms, currently tested in the Android project. Steps to reproduce the Behavior
You'll see that the returning value of |
There is really no reason to use these at all. Just call to your API and that will fail if there is an issue. I did re-write all of it in 4.X |
I've read the blog post about the changes in version 4, but 😅 I am ashamed to admit that I couldn't find more information on how to get this |
Bug Information
IsRemoteReachable returns true if you're connected to the WiFi that requires logging in to connect to internet (and you're not logged in).
Version Number of Plugin: 2.3.0
Device Tested On:Samsung Galaxy S7, Android 6.0.1
Simulator Tested On:
Version of VS: XS 6.3
Version of Xamarin: Xamarin.Android 7.3
Steps to reproduce the Behavior
Expected Behavior
It returns "false" indicating that internet connection is not available.
Actual Behavior
It returns "true" indicating that there is internet connection available (which is not true)
Comments
I've noticed, that you're using await sock.ConnectAsync(sockaddr, msTimeout); to check connection to the remote host. But for such WiFi connections it's really possible to create this connection, though there is no internet connection. Maybe it would be more reliable using Ping for this check?
The text was updated successfully, but these errors were encountered: