隐私声明 Windows 8 Charm 设置 [英] Privacy Statement Windows 8 Charm Settings

查看:26
本文介绍了隐私声明 Windows 8 Charm 设置的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

My Windows Store App certification failed and the note given to me by the tester is that:

该应用已声明访问网络功能且无隐私声明已在 Windows 设置超级按钮中提供".

"The app has declared access to network capabilities and no privacy statement was provided in the Windows Settings Charm".

谁能给我解决这个问题的确切代码.

Can Somebody give me the exact code to solve this problem.

推荐答案

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

In your base page, (or individual page if you want it only on one), you can define the settings like this:

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);
}

很明显,在这个例子中,我们有一个指向外部页面的隐私政策链接,但是如果你愿意,你可以修改代码以在应用程序中打开一个单独的页面.

Obviously in this example, we had the privacy policy link to an external page, however you can modify the code to open up a separate page within the app if you want.

这篇关于隐私声明 Windows 8 Charm 设置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆