In case the network connectivity isn’t on to check if it is off, so, that I’m using to connectivity plug in.
I'm calling this code in ViewModelLocator class
Private static async void NetworkConnectivityChanged(object sender,Plugin.Connectivity.Abstractions.ConnectivityChangedEventArgs e){}
CrossConnectivity.Current.ConnectivityChanged = NetworkConnectivityChanged;
In my windows app after navigating if network connectivity status changed … Here this event is not fire but if not using navigation, we change the network status and it happens it's working.
The workaround is to implement the native network change handler on Winphone or UWP side and stop handling of network change on PCL side for just Winphone and UWP. You can do this by checking the platform before handling.
Create a new Network.cs class with the following code(This detects if there is any change in network connection)
Then in the app.xaml.cs in UWP or WinPhone register the network change handler in OnLaunched event like below
and here is the event handler