How to link to a specific system-setting in your Windows Phone app?

﹥>﹥吖頭↗ 提交于 2019-12-24 15:31:05

问题


I was wondering if it would be possible to hook a button up to a specific setting..

For example: 1. User starts app that uses GPS. 2. The GPS is turned off. A messagebox appears with a message saying that the GPS is turned off and a button. 3. The user taps on the button, and the "location settings" is being launched. 4. The user can switch on the GPS, and goes back to the app.

This would be a more convenient way to change settings, and it saves the user some time.

I think I saw it in an app, but I'm not sure which one. It could be Nokia Maps or Nokia Drive, but as an OEM Nokia is able to manipulate some system settings.

Is this possible?

Kind regards, Niels


回答1:


Yes and no since Mango there is a way to access settings, found it here: windows phone 7 how to navigate to settings menu msdn link: http://msdn.microsoft.com/en-us/library/hh394011%28VS.92%29.aspx

using:

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

It seems here only:

WiFi

Bluetooth

Cellular

AirplaneMode

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



来源:https://stackoverflow.com/questions/12772374/how-to-link-to-a-specific-system-setting-in-your-windows-phone-app

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!