Certification Failed, Charm Settings Privacy Policy not Added


First time when i upload the package for certification on my windows store it was failed. When i check the failed details it was stated that Privacy Policy was not added to the Charm Settings in the App. I thought it was an URL entry in the App Description page in the store release. I added the URL in the App Description section for the release and saved it again. It was again failed for certification with the same message. Then when i further analyse, i found out that we need to add the Command Privacy Policy to the Settings Charm in the App manually using the C# code.

In the App.Xaml.cs add the following lines of code

Declaration

using Windows.UI.ApplicationSettings;
using Windows.UI.Popups;

In the OnLaunched Event add the below code.

protected override async void OnLaunched(LaunchActivatedEventArgs args)
        {
            /// Above code for launching and at the last add the code below
            try
            {
                SettingsPane.GetForCurrentView().CommandsRequested += App_CommandsRequested;
            }
            catch (Exception)
            {
            }
        }
Further down add the below code
void App_CommandsRequested(SettingsPane sender, SettingsPaneCommandsRequestedEventArgs args)
        {
            args.Request.ApplicationCommands.Add(new SettingsCommand("privacypolicy", "Privacy Policy", OpenPrivacy));
        }

        private async void OpenPrivacy(IUICommand cmd)
        {
            Uri privacyUrl = new Uri(www.bing.com/privacy(your url here));
            await Windows.System.Launcher.LaunchUriAsync(privacyUrl);
        }

Thats it, now when you open the App and go to settings charm you can see privacy policy option. When you select the Privacy Policy it will open the IE to navigate the URL.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s