How to detect local network connection?

GrinenkoAGrinenkoA USMember ✭✭
edited November 2017 in Xamarin.iOS

Hi,
I need to detect wether the iPhone is connected to a Wi-Fi or not. The catch is that it doesn't have to be a Wi-Fi w/ internet connection. So, with the class from this example, it returns NetworkStatus.NotReachable when I am connected to a Wi-Fi w/o internet access; however on Android, when I do

((ConnectivityManager)(Forms.Context).GetSystemService("connectivity")).ActiveNetworkInfo?.IsConnected ?? false;

it returns true. Is there a way to do it on iOS?

Tagged:

Answers

Sign In or Register to comment.