我的Windows应用商店认证失败,测试人员给出的提示是:
"该应用程序已声明对网络功能的访问权限,但在Windows设置魅力中未提供隐私声明。"
有人可以给我提供解决此问题的确切代码吗?
我的Windows应用商店认证失败,测试人员给出的提示是:
"该应用程序已声明对网络功能的访问权限,但在Windows设置魅力中未提供隐私声明。"
有人可以给我提供解决此问题的确切代码吗?
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);
}
显然,在这个例子中,我们将隐私政策链接到了外部页面,但是如果你想的话,可以修改代码以在应用程序内打开一个单独的页面。
SettingsCommand privacyStatement = new SettingsCommand(new Guid(), "隐私政策", async (handler) =>
{
await Launcher.LaunchUriAsync(new Uri("http://www.mysite.com/privacy"));
});
args.Request.ApplicationCommands.Clear();
args.Request.ApplicationCommands.Add(privacyStatement);
- Hyndrix