Search code examples
windows-phone-7locationmessagebox

how to make a Location Service Permission MessageBox


I have submited a App but is not certified because this:

"This application uses the Location Service API to determine a user's location and show them events taking place nearby however, it does not appear to contain a privacy policy that is accessible to users explaining how the application uses the Location Service API."

And what i want to do is something like this

enter image description here

When user clicks in Policty Statement open a new window with settings page with my app location policies.

Can anyone help me? How can i add a link like in image?

Cumps


Solution

  • You can navigate to a page using the Hyperlink control

    <Textblock>
      <Hyperlink NavigateUri="/PrivacyPage.xaml" 
                 TargetName="_blank">Privacy Statement</Hyperlink>
    </Textblock>
    

    See MSDN for more info

    I don't think you can put a hyperlink in a call to MessageBox.Show() though so you have to create your own Messagebox-like page. The first time the app is launched you direct the user to your message page. E.g. using this in MainPage.xaml

    OnNavigatedTo(...) 
    {
      if(!AppSettings.HasMessageBeenShown)
      {
        AppSettings.HasMessageBeenShown=true;
        NavigationContext.Navigate(new Uri("/MessagePage.xaml", UriKind.Relative));
      }
    }