隐私声明Windows 8魅力设置

use*_*186 17 c# windows-store-apps

我的Windows Store App认证失败,测试人员给我的注释是:

"该应用已宣布访问网络功能,并且Windows设置功能中未提供任何隐私声明".

有人能给我确切的代码来解决这个问题.

Mik*_*rds 27

在您的基页(或单个页面,如果您只想在一个页面上),您可以定义如下设置:

SettingsPane.GetForCurrentView().CommandsRequested += SettingsCommandsRequested;

private void SettingsCommandsRequested(SettingsPane sender, SettingsPaneCommandsRequestedEventArgs args)
{
    //use "new Guid()" instead of string "privacy" if you're experiencing an exception
    var privacyStatement = new SettingsCommand("privacy", "Privacy Statement", 
            async x => await Launcher.LaunchUriAsync(new Uri("http://some-url.com")));

    args.Request.ApplicationCommands.Clear();
    args.Request.ApplicationCommands.Add(privacyStatement);
}
Run Code Online (Sandbox Code Playgroud)

显然,在此示例中,我们将隐私策略链接到外部页面,但是如果需要,您可以修改代码以在应用程序中打开单独的页面.


Mic*_*out 3

您的应用程序似乎没有包含隐私政策。这是Windows 商店的要求查看此链接以获取更多信息

  • 没有帮助:该链接只说您必须添加它,没有提供任何有关如何执行此操作的代码。 (3认同)