[Bug] Connectivity.ConnectionProfiles contains "Wifi" even if disconnected / turned off on iOS #1613
Comments
There is a solution? |
Hi, I have had the same issue with current stable Xamarin Forms 5.0.0.1874. Will be glad to here from you. Kind regards Thies |
What does |
From what I can see NetworkReachability flags are returning IsWWAN. Will need to look deeper into it. |
NetworkAccess returns NetworkAccess.Internet |
Now I tried to go back to XF 4.8.0.1821 and had the same issue. |
And thanks for looking deeper into it... :-) |
btw: I tested your "old" https://github.com/jamesmontemagno/ConnectivityPlugin and that is working as expected... |
Interesting... I will look at the difference in code between the Connectivity Plugin and this one. Xamarin.Essentials and Xamarin.Forms are completely separate packages and are independent so that is why you see the same thing. |
@gemelo-hh were you using 3.2.0 of the plugin or the 4.0 beta stuff? |
I figured it out ;) |
I'm using 3.2.0... |
EDIT might be because I have no sim and thus no cellular connection to break it. |
fwiw just tested the preview2 build and wifi test seems to be working now. Thanks for the fix! |
Thanks for the feedback! |
I did the same thing @mattleibow as my test phone has no sim and you have to have a sim to see the problem lol |
Description
I'm using
bool WifiOn = Connectivity.ConnectionProfiles.Contains(ConnectionProfile.WiFi);
in theConnectivityChanged
event to detect if my mobile device is connected to the wifi or not.However the bool WifiOn is true on my device, even if the Wifi is snoozed or completely turned off in the settings.
If I turn on the flight mode, it works and the wifi connection is detected as off.
I'm also setting the
bool WifiOn = Connectivity.ConnectionProfiles.Contains(ConnectionProfile.WiFi);
on startup of the app. But even with the wifi turned off this returns true at the app's startup.Steps to Reproduce
bool WifiOn = Connectivity.ConnectionProfiles.Contains(ConnectionProfile.WiFi);
on a real deviceExpected Behavior
The Wifi profile should not be included in the ConnectionProfiles if turned off or snoozed.
Actual Behavior
The Wifi profile is included in the ConnectionProfiles even if the wifi is turned off or snoozed.
Basic Information
The text was updated successfully, but these errors were encountered: