In Windows Phone 7, we had four network settings page that we can invoke using the ConnectionSettingsTask. We had no other APIs to launch other settings page but in Windows Phone 8 Microsoft exposed few schemas for invoking these settings pages.

 

In addition to the existing pages, now we have few more as addition. Today in this post we will learn how to open those settings page using proper URI schemes.

 

In addition to the Airplane Mode, Bluetooth, Cellular and Wi-Fi settings page, now we have few more settings page which we can now invoke from our application. Those new settings pages are Location, Accounts, Email & Accounts and Lock Screen.

 

There is also a API changes to invoke those settings page from your Windows Phone 8 application. Instead of calling the ConnectionSettingsTask, we have to use the “Windows.System.Launcher.LaunchUriAsync(new Uri(URI_SCHEME))” method with proper schema definition as part of the Uri parameter.

 

Here is the reference table for the proper URI scheme definition:

 

Settings Page URI Scheme
Launch Airplane Mode Settings Page
ms-settings-airplanemode:
Launch Bluetooth Settings Page
ms-settings-bluetooth:
Launch Cellular Settings Page ms-settings-cellular:
Launch Wi-Fi Settings Page ms-settings-wifi:
Launch Location Settings Page ms-settings-location:
Launch Account Settings Page ms-settings-accounts:
Launch Email Account Settings Page ms-settings-emailandaccounts:
Launch Lock Screen Settings Page ms-settings-lock:

 

 

In case you want to call the specific settings page, you have to call the LaunchUriAsync(…) method from the Windows.System.Launcher namespace and have to pass the Uri with proper schema definition as parameter.

 

Here is how you have to call the method (generic way):

 
// set proper URI_SCHEME from the definition table as the URI parameter
Windows.System.Launcher.LaunchUriAsync(new Uri(URI_SCHEME));

 

To call individual settings page, you have to call like this:

 
// to launch the Airplane Mode Settings page
Windows.System.Launcher.LaunchUriAsync(new Uri("ms-settings-airplanemode:"));
 
// to launch the Bluetooth Settings page
Windows.System.Launcher.LaunchUriAsync(new Uri("ms-settings-bluetooth:"));
 
// to launch the Cellular Settings page
Windows.System.Launcher.LaunchUriAsync(new Uri("ms-settings-cellular:"));
 
// to launch the Wi-Fi Settings page
Windows.System.Launcher.LaunchUriAsync(new Uri("ms-settings-wifi:"));
 
// to launch the Location Settings page
Windows.System.Launcher.LaunchUriAsync(new Uri("ms-settings-location:"));
 
// to launch the Account Settings page
Windows.System.Launcher.LaunchUriAsync(new Uri("ms-settings-accounts:"));
 
// to launch the Email Account Settings page
Windows.System.Launcher.LaunchUriAsync(new Uri("ms-settings-emailandaccounts:"));
 
// to launch the Lock Screen Settings page
Windows.System.Launcher.LaunchUriAsync(new Uri("ms-settings-lock:"));

 

 

I hope that, it will help you to integrate various settings page of Windows Phone 8 device in your WP8 application. There are few more things that you can do with the LaunchUriAsync(…) method and Scheme which we will discuss in future post. Till then enjoy working with it. Happy Coding.

Have a question? Or, a comment? Let's Discuss it below...

Thank you for visiting our website!

We value your engagement and would love to hear your thoughts. Don't forget to leave a comment below to share your feedback, opinions, or questions.

We believe in fostering an interactive and inclusive community, and your comments play a crucial role in creating that environment.