How to set Airplane mode in Windows Phone using C# ?

Airplane mode is a feature in Windows Phone that lets the user to easily turn off the cellular , Wi-Fi , Bluetooth etc .

If you want to access turn on / off the Airplane mode from your Windows Phone App , then you can use the Launcher “ConnectionSettingsTask” to achieve it .

How to set Airplane mode in Windows Phone using C# ?

Just set the ConnectionSettingsType of the ConnectionSettingsTask to AirplaneMode and call the show method .

This will launch the AirplaneMode settings form where you can turn on/off the AirplaneMode .

To use the ConnectionSettingsTask Launcher , use the namespace Microsoft.Phone.Tasks;

private void button1_Click(object sender, RoutedEventArgs e)

{

SetAirplaneMode();

}

private void SetAirplaneMode()

{

ConnectionSettingsTask connectionSettingsTask = new ConnectionSettingsTask();

connectionSettingsTask.ConnectionSettingsType = ConnectionSettingsType.AirplaneMode;

connectionSettingsTask.Show();

}

httpv://www.youtube.com/embed/bkrPavrLxQQ

Leave A Reply

Your email address will not be published. Required fields are marked *

You May Also Like

In this post, you will learn about sync provider notifications in Windows 11 and how to disable or enable it...
In this tutorial, let’s learn how to enable or disable the startup sound in Windows 11. By default, when Windows...
The CameraCaptureTask allows the Windows Phone 7 App to launch the Camera Application . This will be useful when the...