Saturday, August 17, 2013

How to write Windows Store Privacy Statement in C#

One of the most common reasons Windows 8 apps fail certification is lack of a privacy statement, this blog explains when you need one and gives tips on how to do it.

Do I need a privacy policy for my app?

“Your app must have a privacy policy if it collects personal information”
Now most of us building apps read that and think, hey I’m not collecting anyone’s email address or phone numbers with my app so I don’t need a privacy statement. Then you submit your app for certification and it fails! Why?
Personal information includes: Webcam snaps, Audio/Video recordings, Photos, Documents, Contacts, and so on. So if you are using the webcam to take pictures or creating a document that access contact information or users files you need a privacy statement.
Personal information also includes: IP Addresses. That means if your app has the ‘internet client’ capability enabled in your app you are going to need a privacy statement. By the way, the default templates in Visual Studio include the ‘internet client’ capability, so unless you change the default manifest, you will need a privacy statement.
What do I put in a privacy policy?
“In general, an acceptable privacy policy is one that:
  • Informs users of the information collected by your app
  • Informs users how that information is used, stored, secured and disclosed
  • Describes the controls that users have over the use and sharing of their information
  • Describes how they may access their information
  • Complies with applicable laws and regulations
STEPS to create privacy policy in your app:
1.Create or host a website either in Windows Azure or blog in blogger.
2. Write your privacy policy in a post.
3.When you submit your app for certification, and you fill out the description section of your app, be sure to enter the URL to the privacy policy you created above.

Now add Privacy Statement in Windows 8 Charm Settings 

//Do the following in your App.xaml.cs:

//1) Add the namespaces

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

//2) Add the handler during app initialization

SettingsPane.GetForCurrentView().CommandsRequested += SettingCharmManager_CommandsRequested;

//3) Add my handler that shows the privacy text

private void SettingCharmManager_CommandsRequested(SettingsPane sender, SettingsPaneCommandsRequestedEventArgs args)
        {
            args.Request.ApplicationCommands.Add(new SettingsCommand("privacypolicy", "Privacy policy", OpenPrivacyPolicy));
        }


//4) Add OpenPrivacyPolicy method

private async void OpenPrivacyPolicy(IUICommand command)
        {
            Uri uri = new Uri("<insert web url to your privacy policy here>");
            await Windows.System.Launcher.LaunchUriAsync(uri);
        }


That's should help you get your connected apps through this certification requirement... good luck!

No comments:

Post a Comment