Privacy Policy for Windows Store Apps – Example

Number of Views : 7400

I recently submitted two apps to the windows Store. One was a WinJs app and the Other was a WinRT C# App. Both were rejected because of content compliance. The message that was posted to the dashboard:

Your app doesn’t meet requirement 4.1.

Notes from Testers:
.C:: The app has declared access to network capabilities and no privacy statement was provided in the Windows Settings Charm.

What this translates to is that I did not have a privacy policy specified in the Description and also on the Windows setting Charm. Because the application connects to the internet and has the option the capabilities section you are required to have a privacy policy. You can read more about it here from the Windows App certification requirements. In a WinJS app this is an easy fix. However it took me a bit to figure out how to do this in a C# app. The final fix is pretty straight forward. I wish that Microsoft would have stubbed this out in their template and allowed people to just add this either in the Manifest or just in code.

I have added a simple privacy policy Windows Store app example project if anyone wants to see a working example. —
SimplePrivacyPolicy.zip

To add a privacy polity to your app you can use the steps below.
1. Edit your App.xaml.cs file
2. You will need to add a using statement for Windows.UI.ApplicationSettings

using Windows.UI.ApplicationSettings;

3. Add a function to include a privacy policy link into the Setting Charm

  private void DisplayPrivacyPolicy(SettingsPane sender, SettingsPaneCommandsRequestedEventArgs args)
        {
            SettingsCommand privacyPolicyCommand = new SettingsCommand("privacyPolicy", "Privacy Policy", (uiCommand) => { LaunchPrivacyPolicyUrl(); });
            args.Request.ApplicationCommands.Add(privacyPolicyCommand);
        }

4. Add a function to open a remote URL for your privacy policy. replace the url with your website url.

 async void LaunchPrivacyPolicyUrl()
        {
            Uri privacyPolicyUrl = new Uri("http://www.YOURWEBSITE.com/privacy-policy/");
            var result = await Windows.System.Launcher.LaunchUriAsync(privacyPolicyUrl);
        }

5. Add a call to execute the “DisplayPrivacyPolicy” command when the application starts. You add this inside the OnLaunched method

async void LaunchPrivacyPolicyUrl()
        {
            Uri privacyPolicyUrl = new Uri("http://www.YOURWEBSITE.com/privacy-policy/");
            var result = await Windows.System.Launcher.LaunchUriAsync(privacyPolicyUrl);
        }

Compile and open the setting charm. You can either use your mouse and move from the top or bottom right of your screen, or you can use the “Win+i” keys. You will now see a Privacy Policy link inside your setting area.

You can download the example windows store app privacy policy here to try for yourself — SimplePrivacyPolicy.zip

Leave a Reply

Your email address will not be published. Required fields are marked *