locked
Launching Location Settings

    Question

  • Hello,

       I would like to launch location settings. I can see that it can be done on Windows Phone using the following code snippet: 
    Windows::System::Launcher::LaunchUriAsync(ref new Uri(L"ms-settings-location:"));
    (http://msdn.microsoft.com/en-us/library/windows/apps/xaml/dn741261.aspx)

    But this does not work for Windows 8.1. Can you please clarify whether this can be done at all? and if so kindly give a code snippet or a link that can help me in doing it.

    Thanks & Regards
    Haresh

    Tuesday, September 30, 2014 9:44 AM

Answers

  • Apps can not change system settings programatically. On Windows Phone you can redirect the user to settings using the LaunchUriAsync method but this is not supported in Windows 8.x. Basically you can only ask the user to go to settings and enable location services themselves.
    Wednesday, October 01, 2014 6:48 AM
  • Hi Haresh - these schemes are not supported in Windows 8.1.


    Matt Small - Microsoft Escalation Engineer - Forum Moderator
    If my reply answers your question, please mark this post as answered.

    NOTE: If I ask for code, please provide something that I can drop directly into a project and run (including XAML), or an actual application project. I'm trying to help a lot of people, so I don't have time to figure out weird snippets with undefined objects and unknown namespaces.

    • Proposed as answer by Oliver Ulm Tuesday, September 30, 2014 3:30 PM
    • Marked as answer by Haresh S Chudgar Friday, October 03, 2014 5:48 PM
    Tuesday, September 30, 2014 12:59 PM
    Moderator

All replies

  • Hi Haresh - these schemes are not supported in Windows 8.1.


    Matt Small - Microsoft Escalation Engineer - Forum Moderator
    If my reply answers your question, please mark this post as answered.

    NOTE: If I ask for code, please provide something that I can drop directly into a project and run (including XAML), or an actual application project. I'm trying to help a lot of people, so I don't have time to figure out weird snippets with undefined objects and unknown namespaces.

    • Proposed as answer by Oliver Ulm Tuesday, September 30, 2014 3:30 PM
    • Marked as answer by Haresh S Chudgar Friday, October 03, 2014 5:48 PM
    Tuesday, September 30, 2014 12:59 PM
    Moderator
  • Hello Matt,

    Thanks for the reply. I am putting the question in the other way -

    Say from an app, is it possible to change the location settings on/off? Is there a public api to accomplish the same?In phone apps I see that settings can be launched using LaunchUriAsync. But for windows app 8.1, there is no such option.

    I want to know how to change the GPS/location  settings on/off ?

    Thanks in Advance,

    Pooja

    Wednesday, October 01, 2014 4:18 AM
  • Apps can not change system settings programatically. On Windows Phone you can redirect the user to settings using the LaunchUriAsync method but this is not supported in Windows 8.x. Basically you can only ask the user to go to settings and enable location services themselves.
    Wednesday, October 01, 2014 6:48 AM