How to Use the ConnectionSettings Task for Windows Phone

ConnectionSettings Task allows user to set and adjust device network settings. ConnectionSettings task is defined in Microsoft.Phone.Tasks namespace as below,

image

User can set device network setting to any of the following

image

If you want to set Network connection setting to WiFi, you can set it as below,


ConnectionSettingsTask connectionSettingsTask = new ConnectionSettingsTask();
connectionSettingsTask.ConnectionSettingsType = ConnectionSettingsType.WiFi;
connectionSettingsTask.Show();

image

If you want to set Network connection setting to Bluetooth, you can set it as below,


ConnectionSettingsTask connectionSettingsTask = new ConnectionSettingsTask();
connectionSettingsTask.ConnectionSettingsType = ConnectionSettingsType.Bluetooth;
connectionSettingsTask.Show();

image

If you want to set Network connection setting to Cellular, you can set it as below,


ConnectionSettingsTask connectionSettingsTask = new ConnectionSettingsTask();
connectionSettingsTask.ConnectionSettingsType = ConnectionSettingsType.Cellular;
connectionSettingsTask.Show();

image

If you want to set Network connection setting to Airplane mode, you can set it as below,


ConnectionSettingsTask connectionSettingsTask = new ConnectionSettingsTask();
connectionSettingsTask.ConnectionSettingsType = ConnectionSettingsType.AirplaneMode;
connectionSettingsTask.Show();


image

In this way you can set the network setting of device using ConnectionSettings task. I hope this post is useful. Thanks for reading

4 responses to “How to Use the ConnectionSettings Task for Windows Phone”

  1. […] How to Use the ConnectionSettings Task for Windows Phone […]

  2. […] more about How to Use the ConnectionSettings Task for Windows Phone here Related Articles:Windows Azure Storage Client Library for Windows Phone: Part 1 by @debug_modeBlock […]

  3. […] How to Use the ConnectionSettings Task for Windows Phone […]

  4. Is it possible to program this as a switch from a tile without using the windows gui. So only the event, en not the show()?
    What i want is to touch a tile without opening another screen, and that the touch changes, for example, the wifi setting to On. Another touch will set the wifi setting to Off. Like a switch.

Leave a comment

Create a website or blog at WordPress.com