Switching flight mode programmatically

Is it possible to programmatically turn on / off the flight mode in Windows Phone 7.5. I want to create a background task that will check the time and turn on / off the flight mode.

Thanks in advance.

+5
source share
2 answers

No, this feature is not available.

The principle of developing the platform is that applications cannot do anything without knowing it. If such functionality were available, it would be possible for the application (either intentionally or accidentally, although an error) to receive the status of the devices in settings other than what they might expect from the user. In such a scenario, users will usually disrupt the phone / platform for what happened, rather than a bad application.

+6
source

Although you cannot programmatically do this (as others have mentioned), you can send the user directly to the desired page in the settings panel and let them do it. Here is an example using ConnectionsSettingsTask:

http://msdn.microsoft.com/en-us/library/hh394011(v=VS.92).aspx

You want to set the ConnectionSettingsType property:

http://msdn.microsoft.com/en-us/library/microsoft.phone.tasks.connectionsettingstask.connectionsettingstype(v=VS.92).aspx

To 'AirplaneMode'.

+4

All Articles