I donβt know about any direct API that directly refers to the status of airplane mode, but in fact it disables network availability, so you can check this using DeviceNetworkInformation . (It is a good idea to test this on the device, but I believe that this will simulate the flight mode)
public bool IsAirplaneMode() { bool[] networks = new bool[4] { DeviceNetworkInformation.IsNetworkAvailable, DeviceNetworkInformation.IsCellularDataEnabled, DeviceNetworkInformation.IsCellularDataRoamingEnabled, DeviceNetworkInformation.IsWiFiEnabled }; return (networks.Count(n => n) < 1); }
If you want to ask the user to turn it on or off, you can start the configuration using ConnectionStatusTask .
source share