<分区>
我的 Windows Store App 认证失败,测试人员给我的提示是:
"The app has declared access to network capabilities and no privacy statement was provided in the Windows Settings Charm".
谁能给我解决这个问题的确切代码。
<分区>
我的 Windows Store App 认证失败,测试人员给我的提示是:
"The app has declared access to network capabilities and no privacy statement was provided in the Windows Settings Charm".
谁能给我解决这个问题的确切代码。
最佳答案
在您的基本页面(或单独的页面,如果您只想在一个页面上),您可以这样定义设置:
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);
}
很明显,在这个例子中,我们有指向外部页面的隐私政策链接,但是如果需要,您可以修改代码以在应用程序中打开一个单独的页面。
关于c# - 隐私声明 Windows 8 Charm 设置,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13055381/