I want to check if the location service is turned on or off, so I can inform the user that he needs to turn it on in order to see his location on the map. Also want to check if airplane mode is on/off and if WiFi is turned on/off. Any suggestions?
For location:
Geolocator locator = new Geolocator();
if (locator.LocationStatus == PositionStatus.Disabled)
{
// Location is turned off
}
For network stuff, see DeviceNetworkInformation
class. E.g.
bool isWifiOn = DeviceNetworkInformation.IsWiFiEnabled;
See also: How to detect network changes for Windows Phone
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With