Turn Windows Phone Settings On / Off

OK What I need to do is quite simple: to be able to programmatically (through some API) enable / disable system settings, for example:

  • Wifi
  • Bluetooth
  • Cellular
  • FM radio

Any ideas on how to do this? (I searched everywhere and found nothing relevant)

+4
source share
4 answers

You cannot change them programmatically on Windows Phone, but you can ask the user to change them and redirect the user to the Settings page (for this purpose, use ConnectionSettingsTask http://msdn.microsoft.com/en-us/library/windowsphone/develop/hh394011 (v = vs.105) .aspx ).

+5
source

you cannot change the settings using the code, but you can direct the user to the settings page using the following navigation instruction.

in this case, it will go to the settings page. from this you can set location settings

Similarly, you can switch to wifi and other settings

var navigate = Windows.System.Launcher.LaunchUriAsync (new Uri ("ms-settings-location:"));

+6
source

You cannot change them programmatically. However, you can determine whether they are enabled or not, and send the user to the appropriate settings page to enable / disable themselves.

+1
source

Use the ConnectionSettingsTask class and use the code below to launch the settings page to change the settings -

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

ConnectionSettingsType is an enumeration that has all four properties that will move through you on the corresponding settings page.

Hope this helps

+1
source

Source: https://habr.com/ru/post/1486584/


All Articles